/*xn_mc_aboutsv_1_wrap*/
$(function(){
    if ($("#xn_mc_aboutsv_1_wrap").length>0) {
        $("#xn_mc_aboutsv_1_wrap").find("img").removeAttr("width")
            .removeAttr("height")
            .removeAttr("border")
            .addClass("xn_mc_newsv_13_img")
            .next("span").remove();
    };
})
/*end_xn_mc_aboutsv_1_wrap*/
/*xn_mc_index_37_wrap*/
$(function(){
    if ($("#xn_mc_index_37_wrap").length>0) {
        var oMain=$("#xn_mc_index_37_main");
        var oMain_ul=$("#xn_mc_index_37_mul");
        var aMain_li=oMain_ul.children("li");
        var sLeft =29;  //默认滚动条位置

        oMain_ul.width(aMain_li.outerWidth(true)*aMain_li.length);

        oMain.hover(function(){
            oMain.scrollLeft(sLeft);
        })
    };
})
/*end_xn_mc_index_37_wrap*/

/*xn_mc_claprodv_1_wrap*/
/* EIMS_C_50007_1 Start */
$(function () {
    try {
        if ($("#EIMS_C_50007_1_wrap").length > 0) {
            EIMS_C_50007_1.Init();
        }
    } catch (err) { }
});

var EIMS_C_50007_1 = {
    Config: {
        Speed: 300,    //滑动速度
        IsAutoPlay: true,    //是否自动切换
        TimeInterval: 3000    //切换间隔
    },

    Init: function () {

        EIMS_C_50007_1.InitImages();

        var $main = $(".EIMS_C_50007_1_main");
        var $ul = $(".EIMS_C_50007_1_ul");
        var $li = $ul.children("li");
        var $lights = $(".EIMS_C_50007_1_lights");
        var $curr_class = "EIMS_C_50007_1_lightsCurr";
        var speed = EIMS_C_50007_1.Config.Speed;
        var isAutoPlay = EIMS_C_50007_1.Config.IsAutoPlay;
        var timeInterval = EIMS_C_50007_1.Config.TimeInterval;

        $li.css("width", parseInt($main.outerWidth(true)));
        $ul.css("width", $li.length * $li.outerWidth(true));

        $li.each(function () {
            $lights.append("<span></span>");
            $(this).attr("lights", $(this).index());
        });
        var idx;
        var size = $li.size();
        //点击焦点图切换：
        $lights.children().first().addClass($curr_class);
        $lights.children("span").click(function () {
            var index = $(this).index();
            idx = parseInt($ul.children().first().attr("lights"));
            var num = index - idx;
            num = num > 0 ? num : num + size;
            for (var i = 0; i < num; i++) {
                $ul.append($ul.children().first());
            }
            $ul.stop().animate({ "left": 0 }, speed);
            idx = $ul.children().first().attr("lights");
            $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
        });

        function nextImg() {
            $ul.stop().animate({ left: "-" + $li.outerWidth(true) + "px" }, speed, function () {
                $ul.append($ul.children().first());
                $ul.css("left", 0);
                idx = $ul.children().first().attr("lights");
                $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
                return idx;
            });
        }

        function prevImg() {
            $ul.css('left', -$li.outerWidth(true));
            $ul.prepend($ul.children().last());
            $ul.stop().animate({ "left": 0 }, speed);

            idx = $ul.children().first().attr("lights");
            $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
        }

        if (isAutoPlay == true) {
            var auto = setInterval(nextImg, timeInterval);
            $ul.mouseover(function () {
                clearInterval(auto);
            });
            $ul.mouseleave(function () {
                auto = setInterval(nextImg, timeInterval);
            });
        }

        var mc = new Hammer($ul[0]);
        mc.on("swipeleft", function (ev) {
            nextImg();
        });
        mc.on("swiperight", function (ev) {
            prevImg();
        });

    },

    InitImages: function () {
        var imgs = relatedImages.split(',');
        var htmlStr = "";
        for (var i = 0; i < imgs.length; i++) {
            htmlStr += "<li><img data-original=\"" + imgs[i] + "\" /></li>";
        }
        $(".EIMS_C_50007_1_ul").html(htmlStr);
        ReLoadImage($("#EIMS_C_50007_1_wrap")[0]);
    }

};
/* EIMS_C_50007_1 End */
/*end_xn_mc_claprodv_1_wrap*/



/*xn_mc_claprodv_2_wrap*/
/* EIMS_C_50008_1 Start */
$(function () {
    try {
        if ($("#EIMS_C_50008_1_Panel").length > 0) {
            EIMS_C_50008_1.Init();
        }
    } catch (error) { }
});

var EIMS_C_50008_1 = {
    Config: {//配置信息，可自行修改
        CartUrl: "/m/spcstep1.aspx",     //购物车地址
        AddCartFailPrompt: "加入购物车失败", //加入购物车失败提示
        BuyType: 1,         //购买类型
        IsJump: "0"         //是否跳转
    },
    Init: function () {

        $(".EIMS_C_50008_1_selectors").css("marginLeft", $(".EIMS_C_50008_1_selectors").outerWidth());

        var pId = QueryString("Id"); //商品id

        if (IsNullOrEmpty(pId) || pId < 1) {
            document.location.href = MergeUrlParas("/Admin/Error.aspx", true, ["Tip", "ClassName"], ["请传入商品id", location.href]);
            return;
        }

        if (IsNullOrEmpty(EIMS_C_50008_1_ProInfo)) { return; }

        EIMS_C_50008_1.InitData();
    },
    /* 初始加载商品信息 */
    InitData: function () {

        var proInfo = EIMS_C_50008_1_ProInfo;

        //有销售属性，加载销售属性
        if (!IsNullOrEmpty(proInfo.SalesProperty)) {
            EIMS_C_50008_1.InitPropertys();
        }

        $("#EIMS_C_50008_1_Name").text(proInfo.Name);
        $(".EIMS_C_50008_1_BuyPrice").text(proInfo.BuyPrice.toFixed(2));
        $("#EIMS_C_50008_1_MarketPrice").text(proInfo.MarketPrice.toFixed(2));
        $("#EIMS_C_50008_1_Stock").text(proInfo.Quantity);
        $("#EIMS_C_50008_1_productAliaName").text(EIMS_C_50008_1_ProInfo.AliaName);
        $("#EIMS_C_50008_1_ProNum").val(1);

        $(".EIMS_C_50008_1_property").on("click", function () {
            $(".EIMS_C_50008_1_selectors").attr("bindtype", "");
            EIMS_C_50008_1.SlideSelectors();
        });    //属性选择
        $("#EIMS_C_50008_1_btnAddCart").on("click", function () {
            $(".EIMS_C_50008_1_selectors").attr("bindtype", "0");
            EIMS_C_50008_1.SlideSelectors();
        });    //加入购物车
        $("#EIMS_C_50008_1_btnBuyNow").on("click", function () {
            $(".EIMS_C_50008_1_selectors").attr("bindtype", "1");
            EIMS_C_50008_1.SlideSelectors();
        });    //立刻购买

        $(".EIMS_C_50008_1_AddCount,.EIMS_C_50008_1_MinusCount").on("click", function () {
            EIMS_C_50008_1.ChangeNum(this);
        });    //加减按钮事件
        $("#EIMS_C_50008_1_ProNum").on("change", function () {
            EIMS_C_50008_1.CheckBuyNum(this);
        });    //商品数量文本框输入数字事件
        $("#EIMS_C_50008_1_btnOk").on("click", function () {

            //设置属性标签
            var labels = "", title;
            $(".EIMS_C_50008_1_SelectedPro").each(function () {
                title = $(this).text().length > 0 ? $(this).text() : $(this).find("img").attr("title");
                labels += "/" + title;
            });
            labels = labels.substr(1);
            if (labels.length > 0) {
                $("#EIMS_C_50008_1_SelectedProperty").text(labels);
            }

            //滑动或加入购物车
            var type = $(".EIMS_C_50008_1_selectors").attr("bindtype");
            if (IsNullOrEmpty(type)) {
                EIMS_C_50008_1.SlideSelectors();
            } else {
                EIMS_C_50008_1.AddCart(parseInt(type));
            }
        });    //根据点击来源判断操作类型
        $(".EIMS_C_50008_1_arrowLeft").on("click", function () {
            EIMS_C_50008_1.SlideSelectors();
        });    //隐藏属性选择面板
    },

    /* 加载商品销售属性信息 */
    InitPropertys: function () {

        var proInfo = EIMS_C_50008_1_ProInfo;
        var titles = [], htmls = ["", ""], content = "", labels = "";
        var curSelected = proInfo.SalesProperty.Cur.split(','); //当前选中的属性id和父级id(有父级id的情况下)
        var propertyInfo = proInfo.SalesProperty.Pro; //属性信息
        titles[0] = propertyInfo[0].PropertyLabel;      //一级属性标签名

        for (var i = 0; i < propertyInfo.length; i++) {//[{...,sub: [{}, {}]}, {..., sub: [{{}, {}]}]

            if (propertyInfo[i].Id == curSelected[0]) { //当前选中一级属性
                htmls[0] += "<a href=\"javascript:\" class=\"EIMS_C_50008_1_SelectedPro EIMS_C_50008_1_FirstLevel\"";

                if (curSelected.length > 1 && propertyInfo[i].Sub != null) {    //表示有子级属性
                    var twoPros = propertyInfo[i].Sub;
                    titles[1] = twoPros[0].PropertyLabel; //子级属性标签名

                    for (var k = 0; k < twoPros.length; k++) {

                        if (twoPros[k].Id == curSelected[1]) {//当前选中子级属性

                            proInfo.Id = twoPros[k].ProductId;
                            proInfo.RelatedImages = twoPros[k].RelatedImages;
                            proInfo.AliaName = twoPros[k].AliaName;
                            proInfo.BuyPrice = twoPros[k].BuyPrice; //折后价(若是促销则是促销价)
                            proInfo.GroupPrice = twoPros[k].GroupPrice;
                            proInfo.Discount = twoPros[k].Discount;
                            proInfo.DiscountPrice = twoPros[k].DiscountPrice; //折后价，促销结束后，售价取DiscountPrice
                            proInfo.MarketPrice = IsNullOrEmpty(twoPros[k].MarketPrice) ? 0 : parseFloat(twoPros[k].MarketPrice);
                            proInfo.Price = IsNullOrEmpty(twoPros[k].Price) ? 0 : parseFloat(twoPros[k].Price);
                            proInfo.Quantity = twoPros[k].Quantity;
                            proInfo.IsLowerPrices = twoPros[k].IsLowerPrices;
                            proInfo.LowerPricesStartTime = twoPros[k].LowerPricesStartTime;
                            proInfo.LowerPricesEndTime = twoPros[k].LowerPricesEndTime;

                            htmls[1] += "<a href=\"javascript:\" class=\"EIMS_C_50008_1_SelectedPro\"";
                        } else {
                            htmls[1] += "<a href=\"javascript:\" class=\"EIMS_C_50008_1_DefaultPro\"";
                        }

                        if (IsNullOrEmpty(twoPros[k].PropertyImage)) {//一级属性
                            content = twoPros[k].Name;
                        }
                        else {
                            content = "<img src=\"" + twoPros[k].PropertyImage
                                + "\" title=\"" + twoPros[k].Name + "\"/>"
                        }

                        htmls[1] += " bindtype=\"1\" bindid=\"" + twoPros[k].Id + "\" bindkeyid=\""
                            + twoPros[k].PropertyId + "\">" + content + "</a>&nbsp;";
                    } //for循环 end

                } else {    //表示无子级属性
                    proInfo.Id = propertyInfo[i].ProductId;
                    proInfo.RelatedImages = propertyInfo[i].RelatedImages;
                    proInfo.AliaName = propertyInfo[i].AliaName;
                    proInfo.BuyPrice = propertyInfo[i].BuyPrice;
                    proInfo.GroupPrice = propertyInfo[i].GroupPrice;
                    proInfo.Discount = propertyInfo[i].Discount;
                    proInfo.DiscountPrice = propertyInfo[i].DiscountPrice;
                    proInfo.MarketPrice = IsNullOrEmpty(propertyInfo[i].MarketPrice) ? 0 : parseFloat(propertyInfo[i].MarketPrice);
                    proInfo.Price = IsNullOrEmpty(propertyInfo[i].Price) ? 0 : parseFloat(propertyInfo[i].Price);
                    proInfo.Quantity = propertyInfo[i].Quantity;
                    proInfo.IsLowerPrices = propertyInfo[i].IsLowerPrices;
                    proInfo.LowerPricesStartTime = propertyInfo[i].LowerPricesStartTime;
                    proInfo.LowerPricesEndTime = propertyInfo[i].LowerPricesEndTime;
                }

            } else {
                htmls[0] += "<a href=\"javascript:\" class=\"EIMS_C_50008_1_DefaultPro EIMS_C_50008_1_FirstLevel\"";
            }

            if (IsNullOrEmpty(propertyInfo[i].PropertyImage)) {//一级属性
                content = propertyInfo[i].Name;
            }
            else {
                content = "<img src=\"" + propertyInfo[i].PropertyImage
                    + "\" title=\"" + propertyInfo[i].Name + "\"/>"
            }

            htmls[0] += " bindtype=\"0\" bindid=\"" + propertyInfo[i].Id + "\">" + content + "</a>&nbsp;";
        }

        var html3 = "";
        for (var i = 0; i < titles.length; i++) {
            html3 += "<div class=\"EIMS_C_50008_1_PropertyRow\">" + titles[i] + "：" + htmls[i] + "</div>";
            labels += i == 0 ? titles[i] : "," + titles[i];
        }

        if (html3.length > 0) {
            $(".EIMS_C_50008_1_SaleProperty").html(html3).show();
        }
        $("#EIMS_C_50008_1_SelectedProperty").text(labels);

        $(".EIMS_C_50008_1_PropertyRow a").click(function () {
            EIMS_C_50008_1.ChangeProperty(this);
        });

        $("#EIMS_C_50008_1_productAliaName").text(proInfo.AliaName);
        $(".EIMS_C_50008_1_BuyPrice").text(proInfo.BuyPrice.toFixed(2));
        $("#EIMS_C_50008_1_MarketPrice").text(proInfo.MarketPrice.toFixed(2));
        $("#EIMS_C_50008_1_Stock").text(proInfo.Quantity);
    },

    ChangeProperty: function (obj) {
        var proInfo = EIMS_C_50008_1_ProInfo;
        var type = $(obj).attr("bindtype");
        var propertyId = $(obj).attr("bindid");
        var curSelected = proInfo.SalesProperty.Cur.split(',');

        if (curSelected.length == 1) {  //表示只有一级属性
            if (curSelected[0] == propertyId) {
                return;
            }
            proInfo.SalesProperty.Cur = propertyId;
        }
        else {  //表示有两级属性
            if (propertyId == curSelected[0] || propertyId == curSelected[1]) {
                return;
            }

            if (type == "0") {
                //属性key Id（表T_PropertyKeys的中id）
                var propertyKeyId = $(".EIMS_C_50008_1_SelectedPro")[1].getAttribute("bindkeyid");
                var propertyInfo = proInfo.SalesProperty.Pro;

                //根据key id查属性表id
                for (var i = 0; i < propertyInfo.length; i++) {
                    if (propertyInfo[i].Id == propertyId) {
                        var twoPros = propertyInfo[i].Sub;
                        var isGetKeyId = false; //是否获得属性keyId
                        for (var k = 0; k < twoPros.length; k++) {
                            if (twoPros[k].PropertyId == propertyKeyId) {
                                proInfo.SalesProperty.Cur = propertyId + "," + twoPros[k].Id;
                                isGetKeyId = true;
                                break;
                            }
                        }

                        if (!isGetKeyId) {//没有获取相应keyId，则取twoPros第一条
                            proInfo.SalesProperty.Cur = propertyId + "," + twoPros[0].Id;
                        }
                        break;
                    }
                }

            } else {
                proInfo.SalesProperty.Cur = curSelected[0] + "," + propertyId;
            }
        }
        //重新加载属性信息
        EIMS_C_50008_1.InitPropertys();

        if (type == "0") {//切换一级属性时，重新加载多图信息
            EIMS_C_50008_1.InitMulImgs();
        }

    }, //切换产品属性

    ChangeNum: function (obj) {
        var type = $(obj).attr("bindtype");
        var oldNum = parseInt($("#EIMS_C_50008_1_ProNum").val());
        if (isNaN(oldNum)) {
            oldNum = 1;
        }

        if (type == "1") {
            if (EIMS_C_50008_1_IsCheckQuantity == 1 && oldNum > EIMS_C_50008_1_ProInfo.Quantity - 1) {
                $("#EIMS_C_50008_1_ProNum").val(EIMS_C_50008_1_ProInfo.Quantity);
                return;
            }
            $("#EIMS_C_50008_1_ProNum").val(oldNum + 1);
        } else if (type == "0" && oldNum > 1) {
            $("#EIMS_C_50008_1_ProNum").val(oldNum - 1);
        }
    }, //改变购买数量

    CheckBuyNum: function (obj) {
        var num = parseInt($(obj).val());
        if (isNaN(num) || num < 1) {
            num = 1;
        }

        $(obj).val(num);
        var proRealNum = EIMS_C_50008_1_ProInfo.Quantity;

        if (EIMS_C_50008_1_IsCheckQuantity == 1) {
            if (num > proRealNum) {
                alert("库存不够");
                $(obj).val(1);
            }
        }
    }, //检验输入的购买数量

    InitMulImgs: function () {
        if (EIMS_C_50008_1_ProInfo.Id < 1) {
            return;
        }

        //此类标签在EIMS_C_50007控件上
        if ($(".EIMS_C_50007_ul").length < 1) { return; }

        relatedImages = EIMS_C_50008_1_ProInfo.RelatedImages;
        $(".EIMS_C_50007_lights").html("");
        EIMS_C_50007.Init();

        $(".EIMS_C_50007_ul img").each(function () {
            var imgsrc = $(this).attr("data-original");
            $(this).removeAttr("data-original").attr("src", imgsrc);
        });
    }, //加载多图

    SlideSelectors: function () {
        var $marginLefty = $(".EIMS_C_50008_1_selectors");
        $marginLefty.animate({ marginLeft: parseInt($marginLefty.css('marginLeft'), 10) == 0 ? $marginLefty.outerWidth() : 0 }, "fast", "linear");
    },

    AddCart: function (type) {

        //查询选中属性对应的商品Id
        var proInfo = EIMS_C_50008_1_ProInfo;
        var productId = EIMS_C_50008_1_ProInfo.Id;
        var productNum = parseInt($("#EIMS_C_50008_1_ProNum").val()); //购买数量
        productNum = isNaN(productNum) ? 1 : productNum;
        EIMS_C_50008_1.Config.IsJump = type;
        var params = "", description = "", customizedDesc = "";
        var departmentTypeId = 0;

        if (productId <= 0) {
            alert("无效的商品Id");
            return false;
        }

        if (!IsNullOrEmpty(QueryString("BuyType"))) {
            EIMS_C_50008_1.Config.BuyType = parseInt(QueryString("BuyType"));
        }

        var keyValues = { "productId": productId, "quantity": productNum, "params": params, "description": description,
            "buyType": EIMS_C_50008_1.Config.BuyType, "customizedDesc": customizedDesc, "departmentTypeId": departmentTypeId
        };

        AjaxMethod("ShoppingCart", "AddProduct", keyValues, function (data) {
            EIMS_C_50008_1.AddCartCallBack(data);
        });
    }, //加入购物车

    AddCartCallBack: function (data) {

        if (data.result == 0) {
            alert(EIMS_C_50008_1.Config.AddCartFailPrompt + ", 原因：" + data.msg);
            return;
        }

        if (EIMS_C_50008_1.Config.IsJump == "1") {  //立即购买成功立刻跳转
            var jumpPage = MergeUrlParas(EIMS_C_50008_1.Config.CartUrl, false, [], []);
            document.location.href = jumpPage;
            return;
        } else if (EIMS_C_50008_1.Config.IsJump == "0") {
            alert("添加成功");
            EIMS_C_50008_1.SlideSelectors();
        }

    }, //加入购物车后回调函数

    GoCart: function () {
        var jumpPage = MergeUrlParas(EIMS_C_50008_1.Config.CartUrl, false, [], []);
        document.location.href = jumpPage;
    } //去购物车

}
/*  EIMS_C_50008_1  end  */
/*end_xn_mc_claprodv_2_wrap*/

/*xn_mc_claprodv_3_wrap*/
/* EIMS_C_50009_1 V1.2 2015/01/07 18:18 start */
$(function () {
    try {
        if ($("#EIMS_C_50009_1_Panel").length > 0) {
            EIMS_C_50009_1.Init();
        }
    } catch (error) { }
});

var EIMS_C_50009_1 = {
    Config: {//配置信息，可自行修改
        CartUrl: "/m/spcstep1.aspx",     //购物车地址
        AddCartFailPrompt: "加入购物车失败", //加入购物车失败提示
        BuyType: 1,         //购买类型
        IsJump: "0"         //是否跳转
    },
    Init: function () {

        var pId = QueryString("Id"); //商品id

        if (IsNullOrEmpty(pId) || pId < 1) {
            document.location.href = MergeUrlParas("/Admin/Error.aspx", true, ["Tip", "ClassName"], ["请传入商品id", location.href]);
            return;
        }

        if (IsNullOrEmpty(EIMS_C_50009_1_ProInfo)) { return; }

        EIMS_C_50009_1.InitData();
    },
    /* 初始加载商品信息 */
    InitData: function () {

        var proInfo = EIMS_C_50009_1_ProInfo;

        //有销售属性，加载销售属性
        if (!IsNullOrEmpty(proInfo.SalesProperty)) {
            EIMS_C_50009_1.InitPropertys();
        }

        $("#EIMS_C_50009_1_Name").text(proInfo.Name);
        $(".EIMS_C_50009_1_BuyPrice").text(proInfo.BuyPrice.toFixed(2));
        $("#EIMS_C_50009_1_MarketPrice").text(proInfo.MarketPrice.toFixed(2));
        $("#EIMS_C_50009_1_Stock").text(proInfo.Quantity);
        $("#EIMS_C_50009_1_productAliaName").text(EIMS_C_50009_1_ProInfo.AliaName);
        $("#EIMS_C_50009_1_ProNum").val(1);

        var h = $(document).height() - $(".EIMS_C_50009_1_selectors_bottom").height();
        $(".EIMS_C_50009_1_arrowDown").height(h);
        $(".EIMS_C_50009_1_selectors").hide();

        $("#EIMS_C_50009_1_btnBuyNow").on("click", function () {
            $(".EIMS_C_50009_1_selectors").attr("bindtype", "1");
            $(".EIMS_C_50009_1_selectors").slideDown();
        });    //立刻购买事件

        $("#EIMS_C_50009_1_btnAddCart").on("click", function () {
            $(".EIMS_C_50009_1_selectors").attr("bindtype", "0");
            $(".EIMS_C_50009_1_selectors").slideDown();
        });    //加入购物车事件

        $(".EIMS_C_50009_1_AddCount,.EIMS_C_50009_1_MinusCount").on("click", function () {
            EIMS_C_50009_1.ChangeNum(this);
        });    //加减按钮事件

        $("#EIMS_C_50009_1_ProNum").on("change", function () {
            EIMS_C_50009_1.CheckBuyNum(this);
        });    //商品数量文本框输入数字事件

        $("#EIMS_C_50009_1_btnOk").on("click", function () {
            var type = $(".EIMS_C_50009_1_selectors").attr("bindtype");
            EIMS_C_50009_1.AddCart(parseInt(type));
        });

        $(".EIMS_C_50009_1_arrowDown").on("click", function () {
            $(".EIMS_C_50009_1_selectors").slideUp();
        });
    },

    /* 加载商品销售属性信息 */
    InitPropertys: function () {

        var proInfo = EIMS_C_50009_1_ProInfo;
        var titles = [], htmls = ["", ""], content = "";
        var curSelected = proInfo.SalesProperty.Cur.split(','); //当前选中的属性id和父级id(有父级id的情况下)
        var propertyInfo = proInfo.SalesProperty.Pro; //属性信息
        titles[0] = propertyInfo[0].PropertyLabel;      //一级属性标签名

        for (var i = 0; i < propertyInfo.length; i++) {//[{...,sub: [{}, {}]}, {..., sub: [{{}, {}]}]

            if (propertyInfo[i].Id == curSelected[0]) { //当前选中一级属性
                htmls[0] += "<a href=\"javascript:\" class=\"EIMS_C_50009_1_SelectedPro EIMS_C_50009_1_FirstLevel\"";

                if (curSelected.length > 1 && propertyInfo[i].Sub != null) {    //表示有子级属性
                    var twoPros = propertyInfo[i].Sub;
                    titles[1] = twoPros[0].PropertyLabel; //子级属性标签名

                    for (var k = 0; k < twoPros.length; k++) {

                        if (twoPros[k].Id == curSelected[1]) {//当前选中子级属性

                            proInfo.Id = twoPros[k].ProductId;
                            proInfo.RelatedImages = twoPros[k].RelatedImages;
                            proInfo.AliaName = twoPros[k].AliaName;
                            proInfo.BuyPrice = twoPros[k].BuyPrice; //折后价(若是促销则是促销价)
                            proInfo.GroupPrice = twoPros[k].GroupPrice;
                            proInfo.Discount = twoPros[k].Discount;
                            proInfo.DiscountPrice = twoPros[k].DiscountPrice; //折后价，促销结束后，售价取DiscountPrice
                            proInfo.MarketPrice = IsNullOrEmpty(twoPros[k].MarketPrice) ? 0 : parseFloat(twoPros[k].MarketPrice);
                            proInfo.Price = IsNullOrEmpty(twoPros[k].Price) ? 0 : parseFloat(twoPros[k].Price);
                            proInfo.Quantity = twoPros[k].Quantity;
                            proInfo.IsLowerPrices = twoPros[k].IsLowerPrices;
                            proInfo.LowerPricesStartTime = twoPros[k].LowerPricesStartTime;
                            proInfo.LowerPricesEndTime = twoPros[k].LowerPricesEndTime;

                            htmls[1] += "<a href=\"javascript:\" class=\"EIMS_C_50009_1_SelectedPro\"";
                        } else {
                            htmls[1] += "<a href=\"javascript:\" class=\"EIMS_C_50009_1_DefaultPro\"";
                        }

                        if (IsNullOrEmpty(twoPros[k].PropertyImage)) {//一级属性
                            content = twoPros[k].Name;
                        }
                        else {
                            content = "<img src=\"" + twoPros[k].PropertyImage
                                + "\" title=\"" + twoPros[k].Name + "\"/>"
                        }

                        htmls[1] += " bindtype=\"1\" bindid=\"" + twoPros[k].Id + "\" bindkeyid=\""
                            + twoPros[k].PropertyId + "\">" + content + "</a>&nbsp;";
                    } //for循环 end

                } else {    //表示无子级属性
                    proInfo.Id = propertyInfo[i].ProductId;
                    proInfo.RelatedImages = propertyInfo[i].RelatedImages;
                    proInfo.AliaName = propertyInfo[i].AliaName;
                    proInfo.BuyPrice = propertyInfo[i].BuyPrice;
                    proInfo.GroupPrice = propertyInfo[i].GroupPrice;
                    proInfo.Discount = propertyInfo[i].Discount;
                    proInfo.DiscountPrice = propertyInfo[i].DiscountPrice;
                    proInfo.MarketPrice = IsNullOrEmpty(propertyInfo[i].MarketPrice) ? 0 : parseFloat(propertyInfo[i].MarketPrice);
                    proInfo.Price = IsNullOrEmpty(propertyInfo[i].Price) ? 0 : parseFloat(propertyInfo[i].Price);
                    proInfo.Quantity = propertyInfo[i].Quantity;
                    proInfo.IsLowerPrices = propertyInfo[i].IsLowerPrices;
                    proInfo.LowerPricesStartTime = propertyInfo[i].LowerPricesStartTime;
                    proInfo.LowerPricesEndTime = propertyInfo[i].LowerPricesEndTime;
                }
            } else {
                htmls[0] += "<a href=\"javascript:\" class=\"EIMS_C_50009_1_DefaultPro EIMS_C_50009_1_FirstLevel\"";
            }

            if (IsNullOrEmpty(propertyInfo[i].PropertyImage)) {//一级属性
                content = propertyInfo[i].Name;
            }
            else {
                content = "<img src=\"" + propertyInfo[i].PropertyImage
                    + "\" title=\"" + propertyInfo[i].Name + "\"/>"
            }

            htmls[0] += " bindtype=\"0\" bindid=\"" + propertyInfo[i].Id + "\">" + content + "</a>&nbsp;";
        }

        var html3 = "";
        for (var i = 0; i < titles.length; i++) {
            html3 += "<div class=\"EIMS_C_50009_1_PropertyRow\">" + titles[i] + "：" + htmls[i] + "</div>";
        }

        if (html3.length > 0) {
            $(".EIMS_C_50009_1_SaleProperty").html(html3).show();
        }

        $(".EIMS_C_50009_1_PropertyRow a").on("click", function () {
            EIMS_C_50009_1.ChangeProperty(this);
        });

        $("#EIMS_C_50009_1_productAliaName").text(proInfo.AliaName);
        $(".EIMS_C_50009_1_BuyPrice").text(proInfo.BuyPrice.toFixed(2));
        $("#EIMS_C_50009_1_MarketPrice").text(proInfo.MarketPrice.toFixed(2));
        $("#EIMS_C_50009_1_Stock").text(proInfo.Quantity);
    },

    ChangeProperty: function (obj) {
        var proInfo = EIMS_C_50009_1_ProInfo;
        var type = $(obj).attr("bindtype");
        var propertyId = $(obj).attr("bindid");
        var curSelected = proInfo.SalesProperty.Cur.split(',');

        if (curSelected.length == 1) {  //表示只有一级属性
            if (curSelected[0] == propertyId) {
                return;
            }
            proInfo.SalesProperty.Cur = propertyId;
        }
        else {  //表示有两级属性
            if (propertyId == curSelected[0] || propertyId == curSelected[1]) {
                return;
            }

            if (type == "0") {
                //属性key Id（表T_PropertyKeys的中id）
                var propertyKeyId = $(".EIMS_C_50009_1_SelectedPro")[1].getAttribute("bindkeyid");
                var propertyInfo = proInfo.SalesProperty.Pro;

                //根据key id查属性表id
                for (var i = 0; i < propertyInfo.length; i++) {
                    if (propertyInfo[i].Id == propertyId) {
                        var twoPros = propertyInfo[i].Sub;
                        var isGetKeyId = false; //是否获得属性keyId
                        for (var k = 0; k < twoPros.length; k++) {
                            if (twoPros[k].PropertyId == propertyKeyId) {
                                proInfo.SalesProperty.Cur = propertyId + "," + twoPros[k].Id;
                                isGetKeyId = true;
                                break;
                            }
                        }

                        if (!isGetKeyId) {//没有获取相应keyId，则取twoPros第一条
                            proInfo.SalesProperty.Cur = propertyId + "," + twoPros[0].Id;
                        }
                        break;
                    }
                }

            } else {
                proInfo.SalesProperty.Cur = curSelected[0] + "," + propertyId;
            }
        }
        //重新加载属性信息
        EIMS_C_50009_1.InitPropertys();

        if (type == "0") {//切换一级属性时，重新加载多图信息
            EIMS_C_50009_1.InitMulImgs();
        }

    }, //切换产品属性

    ChangeNum: function (obj) {
        var type = $(obj).attr("bindtype");
        var oldNum = parseInt($("#EIMS_C_50009_1_ProNum").val());
        if (isNaN(oldNum)) {
            oldNum = 1;
        }

        if (type == "1") {
            if (EIMS_C_50009_1_IsCheckQuantity == 1 && oldNum > EIMS_C_50009_1_ProInfo.Quantity - 1) {
                $("#EIMS_C_50009_1_ProNum").val(EIMS_C_50009_1_ProInfo.Quantity);
                return;
            }
            $("#EIMS_C_50009_1_ProNum").val(oldNum + 1);
        } else if (type == "0" && oldNum > 1) {
            $("#EIMS_C_50009_1_ProNum").val(oldNum - 1);
        }
    }, //改变购买数量

    CheckBuyNum: function (obj) {
        var num = parseInt($(obj).val());
        if (isNaN(num) || num < 1) {
            num = 1;
        }

        $(obj).val(num);
        var proRealNum = EIMS_C_50009_1_ProInfo.Quantity;

        if (EIMS_C_50009_1_IsCheckQuantity == 1) {
            if (num > proRealNum) {
                alert("库存不够");
                $(obj).val(1);
            }
        }
    }, //检验输入的购买数量

    InitMulImgs: function () {
        if (EIMS_C_50009_1_ProInfo.Id < 1) {
            return;
        }

        //此类标签在EIMS_C_50007控件上
        if ($(".EIMS_C_50007_ul").length < 1) { return; }

        var imgs = EIMS_C_50009_1_ProInfo.RelatedImages.split(',');
        var htmlStr = "<ul class=EIMS_C_50007_ul>";

        for (var i = 0; i < imgs.length; i++) {
            htmlStr += "<li><a href=\"javascript:\" ><img src=\"" + imgs[i] + "\" /></a></li>";
        }
        htmlStr += "</ul>";
        $(".EIMS_C_50007_ul").html(htmlStr);

        EIMS_C_50007.Init();

    }, //加载多图

    AddCart: function (type) {

        //查询选中属性对应的商品Id
        var proInfo = EIMS_C_50009_1_ProInfo;
        var productId = EIMS_C_50009_1_ProInfo.Id;
        var productNum = parseInt($("#EIMS_C_50009_1_ProNum").val()); //购买数量
        productNum = isNaN(productNum) ? 1 : productNum;
        EIMS_C_50009_1.Config.IsJump = type;
        var params = "", description = "", customizedDesc = "";
        var departmentTypeId = 0;

        if (productId <= 0) {
            alert("无效的商品Id");
            return false;
        }

        if (!IsNullOrEmpty(QueryString("BuyType"))) {
            EIMS_C_50009_1.Config.BuyType = parseInt(QueryString("BuyType"));
        }

        var keyValues = { "productId": productId, "quantity": productNum, "params": params, "description": description,
            "buyType": EIMS_C_50009_1.Config.BuyType, "customizedDesc": customizedDesc, "departmentTypeId": departmentTypeId
        };

        AjaxMethod("ShoppingCart", "AddProduct", keyValues, function (data) {
            EIMS_C_50009_1.AddCartCallBack(data);
        });
    }, //加入购物车

    AddCartCallBack: function (data) {

        if (data.result == 0) {
            alert(EIMS_C_50009_1.Config.AddCartFailPrompt + ", 原因：" + data.msg);
            return;
        }

        if (EIMS_C_50009_1.Config.IsJump == "1") {  //立即购买成功立刻跳转
            var jumpPage = MergeUrlParas(EIMS_C_50009_1.Config.CartUrl, false, [], []);
            document.location.href = jumpPage;
            return;
        } else if (EIMS_C_50009_1.Config.IsJump == "0") {
            alert("添加成功");
            $(".EIMS_C_50009_1_selectors").slideUp();
        }

    }, //加入购物车后回调函数

    GoCart: function () {
        var jumpPage = MergeUrlParas(EIMS_C_50009_1.Config.CartUrl, false, [], []);
        document.location.href = jumpPage;
    } //去购物车
}
/*  EIMS_C_50009_1  end  */
/*end_xn_mc_claprodv_3_wrap*/

/*xn_mc_claprodv_4_wrap*/
/* EIMS_C_50020_1 Start */
$(function () {
    try {
        if ($("#EIMS_C_50020_1_Wrap").length > 0) {
            EIMS_C_50020_1.Init();
        }
    } catch (err) { alert(err); }
});

var EIMS_C_50020_1 = {
    Config: {
        SelectPropertyBeforeAddToCart: true,    //false直接加入购物车，true弹出属性选择框
        ProInfo: null
    },
    Init: function () {
        $(".EIMS_C_50020_1_Cart").on("click", function (e) {
            var wrapper = $(this).parent();
            if (EIMS_C_50020_1.Config.SelectPropertyBeforeAddToCart) {
                var proInfo = $(this).siblings(".EIMS_C_50020_1_ProInfo").text();
                EIMS_C_50020_1.Config.ProInfo = eval('(' + proInfo + ')')
                EIMS_C_50020_1.InitProperty(wrapper);
                EIMS_C_50020_1.BindEvents(wrapper);
                $(this).next().fadeIn();
            } else {
                var productId = wrapper.attr("bindid");
                if (!IsNullOrEmpty(QueryString("id"))) {
                    productId = QueryString("id");
                }
                EIMS_C_50020_1.AddToCart(e, productId, 1);
            }
        });
    },
    BindEvents: function (wrapper) {
        wrapper.find("dd").off("click").on("click", function () {
            EIMS_C_50020_1.ChangeProperty(this, wrapper);
        });

        wrapper.find(".EIMS_C_50020_1_AddCount,.EIMS_C_50020_1_MinusCount").off("click").on("click", function () {
            EIMS_C_50020_1.ChangeNum(this);
        });    //加减按钮事件

        wrapper.find(".EIMS_C_50020_1_ProNum").off("change").on("change", function () {
            EIMS_C_50020_1.CheckBuyNum(this);
        });    //商品数量文本框输入数字事件

        wrapper.find(".EIMS_C_50020_1_BtnAddToCart").off("click").on("click", function (e) {
            var productId = EIMS_C_50020_1.Config.ProInfo.Id;
            if (!IsNullOrEmpty(QueryString("id"))) {
                productId = QueryString("id");
            }
            var quantity = wrapper.find(".EIMS_C_50020_1_ProNum").val();
            EIMS_C_50020_1.AddToCart(e, productId, quantity);
        });

        wrapper.find(".EIMS_C_50020_1_BtnCancel").off("click").on("click", function () {
            wrapper.find(".EIMS_C_50020_1_selector").fadeOut();
        });
    },
    AddToCart: function (e, productId, quantity) {
        if (productId <= 0) {
            alert("无效的商品");
            return false;
        }
        $(e.target).prop("disabled", true);
        var keyValues = { "productId": productId, "quantity": quantity };
        AjaxMethod("ShoppingCart", "AddProduct", keyValues, function (data) {
            if (data.result == 0) {
                alert("加入购物车失败, 原因：" + data.msg);
                return;
            }
            EIMS_C_50020_1.AnimatePlusOne(e);
            $(e.target).parents(".EIMS_C_50020_1_Wrap").find(".EIMS_C_50020_1_selector").fadeOut();
            $(e.target).prop("disabled", false);
            if ($("#EIMS_C_50005_Wrap").length > 0) {
                EIMS_C_50005.Init();
            }
        });
    },

    InitProperty: function (wrapper) {
        var proInfo = EIMS_C_50020_1.Config.ProInfo;
        var titles = [], htmls = ["", ""], content = "";
        var curSelected = proInfo.SalesProperty.Cur.split(','); //当前选中的属性id和父级id(有父级id的情况下)
        var propertyInfo = proInfo.SalesProperty.Pro; //属性信息
        titles[0] = propertyInfo[0].PropertyLabel;      //一级属性标签名

        for (var i = 0; i < propertyInfo.length; i++) {//[{...,sub: [{}, {}]}, {..., sub: [{{}, {}]}]

            if (propertyInfo[i].Id == curSelected[0]) { //当前选中一级属性
                htmls[0] += "<dd class=\"EIMS_C_50020_1_SelectedPro EIMS_C_50020_1_FirstLevel\"";

                if (curSelected.length > 1 && propertyInfo[i].Sub != null) {    //表示有子级属性
                    var twoPros = propertyInfo[i].Sub;
                    titles[1] = twoPros[0].PropertyLabel; //子级属性标签名

                    for (var k = 0; k < twoPros.length; k++) {

                        if (twoPros[k].Id == curSelected[1]) {//当前选中子级属性
                            proInfo.Id = twoPros[k].ProductId;
                            htmls[1] += "<dd class=\"EIMS_C_50020_1_SelectedPro\"";
                        } else {
                            htmls[1] += "<dd class=\"EIMS_C_50020_1_DefaultPro\"";
                        }

                        if (IsNullOrEmpty(twoPros[k].PropertyImage)) {//一级属性
                            content = twoPros[k].Name;
                        }
                        else {
                            content = "<img src=\"" + twoPros[k].PropertyImage
                                + "\" title=\"" + twoPros[k].Name + "\"/>"
                        }

                        htmls[1] += " bindtype=\"1\" bindid=\"" + twoPros[k].Id + "\" bindkeyid=\""
                            + twoPros[k].PropertyId + "\">" + content + "</a>&nbsp;";
                    } //for循环 end

                } else {    //表示无子级属性
                    proInfo.Id = propertyInfo[i].ProductId;
                }
            } else {
                htmls[0] += "<dd class=\"EIMS_C_50020_1_DefaultPro EIMS_C_50020_1_FirstLevel\"";
            }

            if (IsNullOrEmpty(propertyInfo[i].PropertyImage)) {//一级属性
                content = propertyInfo[i].Name;
            }
            else {
                content = "<img src=\"" + propertyInfo[i].PropertyImage
                    + "\" title=\"" + propertyInfo[i].Name + "\"/>"
            }

            htmls[0] += " bindtype=\"0\" bindid=\"" + propertyInfo[i].Id + "\">" + content + "</a>&nbsp;";
        }

        var html3 = "";
        for (var i = 0; i < titles.length; i++) {
            html3 += "<dt class=\"EIMS_C_50020_1_PropertyRow\">" + titles[i] + "：" + htmls[i] + "</dt>";
        }

        if (html3.length > 0) {
            wrapper.find(".EIMS_C_50020_1_SaleProperty").html(html3);
        }

        wrapper.find(".EIMS_C_50020_1_Stock").text(proInfo.Quantity);
        EIMS_C_50020_1.BindEvents(wrapper);
    },
    ChangeProperty: function (obj, wrapper) {
        var proInfo = EIMS_C_50020_1.Config.ProInfo;
        var type = $(obj).attr("bindtype");
        var propertyId = $(obj).attr("bindid");
        var curSelected = proInfo.SalesProperty.Cur.split(',');

        if (curSelected.length == 1) {  //表示只有一级属性
            if (curSelected[0] == propertyId) {
                return;
            }
            proInfo.SalesProperty.Cur = propertyId;
        }
        else {  //表示有两级属性
            if (propertyId == curSelected[0] || propertyId == curSelected[1]) {
                return;
            }

            if (type == "0") {
                //属性key Id（表T_PropertyKeys的中id）
                var propertyKeyId = wrapper.find(".EIMS_C_50020_1_SelectedPro")[1].getAttribute("bindkeyid");
                var propertyInfo = proInfo.SalesProperty.Pro;

                //根据key id查属性表id
                for (var i = 0; i < propertyInfo.length; i++) {
                    if (propertyInfo[i].Id == propertyId) {
                        var twoPros = propertyInfo[i].Sub;
                        var isGetKeyId = false; //是否获得属性keyId
                        for (var k = 0; k < twoPros.length; k++) {
                            if (twoPros[k].PropertyId == propertyKeyId) {
                                proInfo.SalesProperty.Cur = propertyId + "," + twoPros[k].Id;
                                isGetKeyId = true;
                                break;
                            }
                        }

                        if (!isGetKeyId) {//没有获取相应keyId，则取twoPros第一条
                            proInfo.SalesProperty.Cur = propertyId + "," + twoPros[0].Id;
                        }
                        break;
                    }
                }

            } else {
                proInfo.SalesProperty.Cur = curSelected[0] + "," + propertyId;
            }
        }
        //重新加载属性信息
        EIMS_C_50020_1.InitProperty(wrapper);
    }, //切换产品属性
    ChangeNum: function (obj) {
        var type = $(obj).attr("bindtype");
        var proNum = $(obj).siblings(".EIMS_C_50020_1_ProNum");
        var oldNum = parseInt(proNum.val());
        if (isNaN(oldNum)) {
            oldNum = 1;
        }

        if (type == "1") {
            var q = EIMS_C_50020_1.Config.ProInfo.Quantity;
            if ($(this).parents(".EIMS_C_50020_1_Wrap").find(".EIMS_C_50020_1_CheckCount").text() == "1" && oldNum > q - 1) {
                proNum.val(q);
                return;
            }
            proNum.val(oldNum + 1);
        } else if (type == "0" && oldNum > 1) {
            proNum.val(oldNum - 1);
        }
    }, //改变购买数量

    CheckBuyNum: function (obj) {
        var num = parseInt($(obj).val());
        if (isNaN(num) || num < 1) {
            num = 1;
        }

        $(obj).val(num);
        var proRealNum = EIMS_C_50020_1.Config.ProInfo.Quantity;

        if ($(this).parents(".EIMS_C_50020_1_Wrap").find(".EIMS_C_50020_1_CheckCount").text() == "1") {
            if (num > proRealNum) {
                alert("库存不够");
                $(obj).val(1);
            }
        }
    }, //检验输入的购买数量
    AnimatePlusOne: function (e) {
        var $i = $("<b>").text("+1");
        var x = e.pageX, y = e.pageY;
        $i.css({ top: y - 20, left: x, position: "absolute", color: "#E94F06" });
        $("body").append($i);
        $i.animate({ top: y - 180, opacity: 0, "font-size": "1.4em" }, 1500, function () {
            $i.remove();
        });
        e.stopPropagation();
    }
}
//EIMS_C_50020_1 End
/*end_xn_mc_claprodv_4_wrap*/

/*xn_mc_pro_51_wrap*/
$(function(){
    if($("#xn_mc_pro_51_wrap").length > 0){
        var speed = 600;
        var cspan = $(".xn_mc_pro_51_tname");
        var cinner = $(".xn_mc_pro_51_inner");
        var index = 0;
        cspan.eq(index).addClass("curr");

        cspan.click(function(){
            index = $(this).index();
            $(this).addClass("curr").siblings().removeClass("curr");
            cinner.eq(index).show().siblings().hide();
        });
    }
});
/*end_xn_mc_pro_51_wrap*/

/*xn_mc_prodv_37_wrap*/
/*-------2015-07-01修改取消留言-------*/
$(function(){
    try {
        if ($("#EIMS_C_10002_8_Main").length > 0) {
            EIMS_C_10002_8.Init();
        }
    } catch (err) { }
});

var EIMS_C_10002_8 = {


    Init: function () {
        $("#EIMS_C_10002_8_Params").val(para);
    },

    createMsgDiv: function () { //弹出一个div层
        var temp = $(".EIMS_C_10002_8_ui-btn")[0];
        if ($("#EIMS_C_10002_8_Type_ddl").length > 0) {
            var listDiv = document.createElement("DIV");
            listDiv.id = "EIMS_C_10002_8_MsgTypeList_div";
            listDiv.style.position = "absolute";
            listDiv.style.width = document.body.scrollWidth;
            listDiv.style.height = document.documentElement.offsetHeight;
            listDiv.style.zIndex = '1';
            listDiv.style.top = ($(".EIMS_C_10002_8_ui-btn").height() + $(".EIMS_C_10002_8_ui-btn").offset().top + 1) + "px";
            //listDiv.style.left=temp.style.offsetLeft+"px";
            listDiv.style.width = temp.offsetWidth + "px";

            listDiv.style.backgroundColor = "#D7D7D7";

            //listDiv.style.opacity='0.5';
            //listDiv.style.filter="alpha(opacity=80)";
            listDiv.style.opacity = '0.9';


            var msgListDdl = $("#EIMS_C_10002_8_Type_ddl")[0];
            var innerHtml = "<ul style='list-style:none;cursor:pointer;'>";
            for (var i = 0; i < msgListDdl.children.length; i++) {
                innerHtml += "<li onmousemove='this.style.backgroundColor=\"#4b6c9e\";' onmouseout='this.style.backgroundColor=\"\";' onclick='EIMS_C_10002_8.selectMsgType(this)' value='" + msgListDdl.children[i].value + "'>" + msgListDdl.children[i].innerHTML + "</li>";
            }
            innerHtml += "</ul>";

            listDiv.innerHTML = innerHtml;
            document.body.appendChild(listDiv);
        }
    },
    selectMsgType: function (obj) { //选择留言类型
        $("#EIMS_C_10002_8_Type_ddl").val(obj.value);
        if (obj.value > 0) {
            $(".EIMS_C_10002_8_ui-btn-text").html(obj.innerHTML);
        } else {
            $(".EIMS_C_10002_8_ui-btn-text").html("请选择留言类型");
        }

        alert($('#EIMS_C_10002_8_MsgTypeList_div'));

        //关闭弹出的div层
        $('#EIMS_C_10002_8_MsgTypeList_div').remove();
    },

    CheckMsgInfo: function () { //验证留言提交字段
        if ($("#EIMS_C_10002_8_Type_ddl").length > 0) {
            var msgType = $("#EIMS_C_10002_8_Type_ddl"); //留言类型
            if (msgType.val() <= 0) {
                alert('请选择留言类型！');
                return false;
            }
        }

        if ($("#EIMS_C_10002_8_AuthorName_Div").length > 0) {
            var msgAuthorName = $("#EIMS_C_10002_8_AuthorName"); //联系人
            if (msgAuthorName.val() == "联系人" || msgAuthorName.val() == "") {
                alert("请输入联系人姓名！");
                msgAuthorName.focus();
                return false;
            }
        }

        if ($("#EIMS_C_10002_8_CompanyName").length > 0) {
            var msgCompany = $("#EIMS_C_10002_8_CompanyName"); //公司名称
            if (msgCompany.val() == "公司名称" || msgCompany.val() == "") {
                alert("请输入公司名称！");
                return false;
            }
        }

        if ($("#EIMS_C_10002_8_Telephone_Div").length > 0) {
            var isMobile = /^1[3-8]{1}\d{9}$/;
            var isNumber = /^[0-9]*$/;  //11位数
            var isNum = /^[0-9]*[1-9][0-9]*$/; //自然数
            var isLetter=/[^0-9.]/g;

            var msgMobile = $("#EIMS_C_10002_8_Telephone"); //用户手机号
            if (msgMobile.val() == "联系人手机" || msgMobile.val() == "") {
                alert("请输入联系人手机！");
                return false;
            }

            if (isLetter.test(msgMobile.val())) {
                alert("请输入正确的手机号码！");
                return false;
            }

            if (isNum.test(msgMobile.val())) {
                if (!isNumber.test(msgMobile.val())) {
                    alert("手机号码应为11位数字，以13/14/15/17/18开头！");
                    return false;
                }

                if (!isMobile.test(msgMobile.val())) {
                    alert("手机号码格式不正确，请重新输入！");
                    return false;
                }
            }
        }

        if ($("#EIMS_C_10002_8_Email_Div").length > 0) {
            var isEmail = /^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/;

            var msgEmail = $("#EIMS_C_10002_8_Email");
            if (msgEmail.val() == "Email" || msgEmail.val() == "") {
                alert("请输入联系人邮箱！");
                return false;
            }

            if (!isEmail.test(msgEmail.val())) {
                alert("邮箱格式不正确，请重新输入！");
                return false;
            }
        }

        if ($("#EIMS_C_10002_8_MsgContent").length > 0) {
            var msgContent = $("#EIMS_C_10002_8_MsgContent"); //留言内容
            if (msgContent.val() == "请输入留言内容..." || msgContent.val() == "") {
                alert('请输入留言内容！');
                return false;
            }
        }

        return true;
    },



    SubmitAdvisorys: function () {
        //提交验证
        if (!EIMS_C_10002_8.CheckMsgInfo()) {
            return false;
        }

        var Params = null;
        if (para == null) {
            alert("无效的参数！");
            return false;
        }

        if (para.indexOf(",") < 0) {
            return false;
        }

        var paras = para.split(',');
        var typeid = paras[0];
        var device = paras[1];
        var content = "";

        var magContent = $("#EIMS_C_10002_8_MsgContent").val();
        var company = $("#EIMS_C_10002_8_CompanyName").val();
        var authorName = $("#EIMS_C_10002_8_AuthorName").val();
        var email = $("#EIMS_C_10002_8_Email").val();
        var mobile = $("#EIMS_C_10002_8_Telephone").val();

        var content = "<Submit>\
                            <Content>" + magContent + "</Content>\
                            <Company>" + company + "</Company>\
                            <AuthorName>" + authorName + "</AuthorName>\
                            <Email>" + email + "</Email>\
                            <Mobile>" + mobile + "</Mobile>\
                      </Submit>";

        Params = { "TypeId": typeid, "Device": device, "content": content };

        AjaxMethod("Common", "SubmitAdvisorys", Params, function (data) {
            if (IsNullOrEmpty(data)) {
                return;
            }

            if (data.result != 1) {
                return;
            }

            alert("提交留言成功！");
            document.location.reload();
        });

    },

    CancelMsg: function () {    //取消留言
        $("#EIMS_C_10002_8_MsgContent").val("");
        $("#EIMS_C_10002_8_CompanyName").val("");
        $("#EIMS_C_10002_8_AuthorName").val("");
        $("#EIMS_C_10002_8_Telephone").val("");
        $("#EIMS_C_10002_8_Email").val("");
        $("#EIMS_C_10002_8_postText").val("");
    }
}
/*end_xn_mc_prodv_37_wrap*/

/*xn_mc_enrol_type*/
$(function(){
    if ($("#xn_mc_enrol_type").length>0) {
        var oLi=$("#xn_mc_enrol_tUl").children("li");
        var href;
        var url = window.location.href;
        var oliUrlPara;
        var iLiTypeId;

        if(url.indexOf('?') != -1){
            var urlPara = url.split('?')[1].split('&');
            var typeid,id;
            for (var i = 0; i < urlPara.length; i++) {
                if (urlPara[i].indexOf('TypeId') != -1) {
                    typeid = urlPara[i].split('=')[1];

                } else if (urlPara[i].indexOf('FId') != -1)
                {} else {
                    id = urlPara[i].split('=')[1];
                }
            }
            if(typeid && id){
                var num = typeid.toString() + id.toString();
            }
        }

        oLi.each(function(){
            href= $(this).find("a").attr("href");
            oliUrlPara = href.split('?')[1].split('&');

            for (var j = 0; j < oLi.length; j++) {
                if (oliUrlPara[j].indexOf('TypeId') != -1) {
                    iLiTypeId = oliUrlPara[j].split('=')[1];
                }
            }

            if( id === iLiTypeId){
                $(this).addClass("xn_mc_enrol_tLi_curr");
            }
        })
    };
})
/*end_xn_mc_enrol_type*/

/*xn_mc_solutionv_5_wrap*/
$(function(){
    if($("#xn_mc_solutionv_5_wrap").length > 0){
        $(this).find("img").removeAttr("width")
            .removeAttr("height")
            .removeAttr("border")
            .addClass("xn_mc_solutionv_5_img")
            .next("span").remove();
    }
});
/*end_xn_mc_solutionv_5_wrap*/

/*xn_mc_enrolv_2_wrap*/
$(function(){
    if ($("#xn_mc_enrolv_2_wrap").length>0) {
        $("#xn_mc_enrolv_2_imgbox").children("img").removeAttr("width")
            .removeAttr("height")
            .removeAttr("border")
            .addClass("xn_mc_enrolv_2_img")
            .next("span").remove();
    };
})
/*end_xn_mc_enrolv_2_wrap*/

/*xn_mc_teachers_1_wrap*/
$(function(){
    if($("#xn_mc_teachers_1_wrap").length > 0){
        var oTop_ul = $("#xn_mc_teachers_1_tul");
        var oTop_li = oTop_ul.children("li");
        var oTop_li_length=oTop_li.length;
        var oTop_li_width=oTop_li.outerWidth(true);
        var oCon_ulWrap = $("#xn_mc_teachers_1_sub");
        var oCon_ul = $("#xn_mc_teachers_1_subUl");
        var oCon_li = oCon_ul.find(".xn_mc_teachers_1_subLi");
        var currClass = "xn_mc_teachers_1_tCurr";
        var speed = 500;
        var iNumber=3;     //控制每屏显示的栏目个数

        $(".xn_index_tit").each(function(){
            $(this).attr("index",$(this).index());
        });

        $(".xn_mc_teachers_1_smore").click(function(){
            var ab=$(this);
            setTimeout(function(){
                ab.parents(".xn_mc_teachers_1_subLi").find(".xn_index_tit").attr("index",1);
            },1000);
        });

        oTop_ul.width(100*oTop_li_length+"%");
        oTop_li.width(100/oTop_li_length/iNumber+"%");

        oTop_li.first().addClass(currClass);
        oCon_li.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
        });

        oCon_li.css("width",$(window).width());
        oCon_ul.css("width",$(window).width() * oCon_li.length).css("position","relative");

        var idx = 1;

        //点击焦点图切换：
        oTop_li.first().addClass(currClass);

        oTop_li.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true) * _this.index()},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
        });

        //左右切换：
        function nextImg(){
            if(idx < oCon_li.length){
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*idx},speed);
                oTop_li.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                if (idx>=iNumber) {
                    oTop_li.eq(idx-iNumber).addClass("xn_mc_teachers_1_control");//往前走添加class名
                };
                idx++;
            }else{
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*(oCon_li.length-1) - 100 +"px"},speed/oCon_li.length);
                oCon_ul.animate({"left":"-"+oCon_li.outerWidth(true)*(oCon_li.length-1)},speed/oCon_li.length);
            }
        }

        function prevImg(){
            if(idx > 1){
                var iMoveLeftNum=idx-2;
                oTop_li.eq(iMoveLeftNum).removeClass("xn_mc_teachers_1_control");//往回走移除添加的class名
                idx--;
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*(idx-1)},speed);
                oTop_li.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
            }else{
                oCon_ul.stop().animate({"left":100+"px"},speed/oCon_li.length);
                oCon_ul.animate({"left":0},speed/oCon_li.length);
            }
        }

        var dragDistance = 5 ;
        var dragTime = 200;
        var oTop_HammerOne=HammerOne(oTop_ul);//类别
        var oCon_HammerOne=HammerOne(oCon_ulWrap);//类别说明-图片
        oTop_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }else{}
                    }
                    break;
                default:
            }
        });
        oCon_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }else{}
                    }
                    break;
                default:
            }
        });
    }
});
/*end_xn_mc_teachers_1_wrap*/


/*xn_mc_solutionv_8_wrap*/
/*-------2015-07-01修改取消留言-------*/
$(function(){
    try {
        if ($("#EIMS_C_10002_7_Main").length > 0) {
            EIMS_C_10002_7.Init();
        }
    } catch (err) { }
});

var EIMS_C_10002_7 = {


    Init: function () {
        $("#EIMS_C_10002_7_Params").val(para);
    },

    createMsgDiv: function () { //弹出一个div层
        var temp = $(".EIMS_C_10002_7_ui-btn")[0];
        if ($("#EIMS_C_10002_7_Type_ddl").length > 0) {
            var listDiv = document.createElement("DIV");
            listDiv.id = "EIMS_C_10002_7_MsgTypeList_div";
            listDiv.style.position = "absolute";
            listDiv.style.width = document.body.scrollWidth;
            listDiv.style.height = document.documentElement.offsetHeight;
            listDiv.style.zIndex = '1';
            listDiv.style.top = ($(".EIMS_C_10002_7_ui-btn").height() + $(".EIMS_C_10002_7_ui-btn").offset().top + 1) + "px";
            //listDiv.style.left=temp.style.offsetLeft+"px";
            listDiv.style.width = temp.offsetWidth + "px";

            listDiv.style.backgroundColor = "#D7D7D7";

            //listDiv.style.opacity='0.5';
            //listDiv.style.filter="alpha(opacity=80)";
            listDiv.style.opacity = '0.9';


            var msgListDdl = $("#EIMS_C_10002_7_Type_ddl")[0];
            var innerHtml = "<ul style='list-style:none;cursor:pointer;'>";
            for (var i = 0; i < msgListDdl.children.length; i++) {
                innerHtml += "<li onmousemove='this.style.backgroundColor=\"#4b6c9e\";' onmouseout='this.style.backgroundColor=\"\";' onclick='EIMS_C_10002_7.selectMsgType(this)' value='" + msgListDdl.children[i].value + "'>" + msgListDdl.children[i].innerHTML + "</li>";
            }
            innerHtml += "</ul>";

            listDiv.innerHTML = innerHtml;
            document.body.appendChild(listDiv);
        }
    },
    selectMsgType: function (obj) { //选择留言类型
        $("#EIMS_C_10002_7_Type_ddl").val(obj.value);
        if (obj.value > 0) {
            $(".EIMS_C_10002_7_ui-btn-text").html(obj.innerHTML);
        } else {
            $(".EIMS_C_10002_7_ui-btn-text").html("请选择留言类型");
        }

        alert($('#EIMS_C_10002_7_MsgTypeList_div'));

        //关闭弹出的div层
        $('#EIMS_C_10002_7_MsgTypeList_div').remove();
    },

    CheckMsgInfo: function () { //验证留言提交字段
        if ($("#EIMS_C_10002_7_Type_ddl").length > 0) {
            var msgType = $("#EIMS_C_10002_7_Type_ddl"); //留言类型
            if (msgType.val() <= 0) {
                alert('请选择留言类型！');
                return false;
            }
        }

        if ($("#EIMS_C_10002_7_AuthorName_Div").length > 0) {
            var msgAuthorName = $("#EIMS_C_10002_7_AuthorName"); //联系人
            if (msgAuthorName.val() == "联系人" || msgAuthorName.val() == "") {
                alert("请输入联系人姓名！");
                msgAuthorName.focus();
                return false;
            }
        }

        if ($("#EIMS_C_10002_7_CompanyName").length > 0) {
            var msgCompany = $("#EIMS_C_10002_7_CompanyName"); //公司名称
            if (msgCompany.val() == "公司名称" || msgCompany.val() == "") {
                alert("请输入公司名称！");
                return false;
            }
        }

        if ($("#EIMS_C_10002_7_Telephone_Div").length > 0) {
            var isMobile = /^1[3-8]{1}\d{9}$/;
            var isNumber = /^[0-9]*$/;  //11位数
            var isNum = /^[0-9]*[1-9][0-9]*$/; //自然数
            var isLetter=/[^0-9.]/g;

            var msgMobile = $("#EIMS_C_10002_7_Telephone"); //用户手机号
            if (msgMobile.val() == "联系人手机" || msgMobile.val() == "") {
                alert("请输入联系人手机！");
                return false;
            }

            if (isLetter.test(msgMobile.val())) {
                alert("请输入正确的手机号码！");
                return false;
            }

            if (isNum.test(msgMobile.val())) {
                if (!isNumber.test(msgMobile.val())) {
                    alert("手机号码应为11位数字，以13/14/15/17/18开头！");
                    return false;
                }

                if (!isMobile.test(msgMobile.val())) {
                    alert("手机号码格式不正确，请重新输入！");
                    return false;
                }
            }
        }

        if ($("#EIMS_C_10002_7_Email_Div").length > 0) {
            var isEmail = /^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/;

            var msgEmail = $("#EIMS_C_10002_7_Email");
            if (msgEmail.val() == "Email" || msgEmail.val() == "") {
                alert("请输入联系人邮箱！");
                return false;
            }

            if (!isEmail.test(msgEmail.val())) {
                alert("邮箱格式不正确，请重新输入！");
                return false;
            }
        }

        if ($("#EIMS_C_10002_7_MsgContent").length > 0) {
            var msgContent = $("#EIMS_C_10002_7_MsgContent"); //留言内容
            if (msgContent.val() == "请输入留言内容..." || msgContent.val() == "") {
                alert('请输入留言内容！');
                return false;
            }
        }

        return true;
    },



    SubmitAdvisorys: function () {
        //提交验证
        if (!EIMS_C_10002_7.CheckMsgInfo()) {
            return false;
        }

        var Params = null;
        if (para == null) {
            alert("无效的参数！");
            return false;
        }

        if (para.indexOf(",") < 0) {
            return false;
        }

        var paras = para.split(',');
        var typeid = paras[0];
        var device = paras[1];
        var content = "";

        var magContent = $("#EIMS_C_10002_7_MsgContent").val();
        var company = $("#EIMS_C_10002_7_CompanyName").val();
        var authorName = $("#EIMS_C_10002_7_AuthorName").val();
        var email = $("#EIMS_C_10002_7_Email").val();
        var mobile = $("#EIMS_C_10002_7_Telephone").val();

        var content = "<Submit>\
                            <Content>" + magContent + "</Content>\
                            <Company>" + company + "</Company>\
                            <AuthorName>" + authorName + "</AuthorName>\
                            <Email>" + email + "</Email>\
                            <Mobile>" + mobile + "</Mobile>\
                      </Submit>";

        Params = { "TypeId": typeid, "Device": device, "content": content };

        AjaxMethod("Common", "SubmitAdvisorys", Params, function (data) {
            if (IsNullOrEmpty(data)) {
                return;
            }

            if (data.result != 1) {
                return;
            }

            alert("提交留言成功！");
            document.location.reload();
        });

    },

    CancelMsg: function () {    //取消留言
        $("#EIMS_C_10002_7_MsgContent").val("");
        $("#EIMS_C_10002_7_CompanyName").val("");
        $("#EIMS_C_10002_7_AuthorName").val("");
        $("#EIMS_C_10002_7_Telephone").val("");
        $("#EIMS_C_10002_7_Email").val("");
        $("#EIMS_C_10002_7_postText").val("");
    }
}
/*end_xn_mc_solutionv_8_wrap*/

/*xn_mc_feedback_2_wrap*/
/*-------2015-07-01修改取消留言-------*/
$(function(){
    try {
        if ($("#EIMS_C_10002_6_Main").length > 0) {
            EIMS_C_10002_6.Init();
        }
    } catch (err) { }
});

var EIMS_C_10002_6 = {


    Init: function () {
        $("#EIMS_C_10002_6_Params").val(para);
    },

    createMsgDiv: function () { //弹出一个div层
        var temp = $(".EIMS_C_10002_6_ui-btn")[0];
        if ($("#EIMS_C_10002_6_Type_ddl").length > 0) {
            var listDiv = document.createElement("DIV");
            listDiv.id = "EIMS_C_10002_6_MsgTypeList_div";
            listDiv.style.position = "absolute";
            listDiv.style.width = document.body.scrollWidth;
            listDiv.style.height = document.documentElement.offsetHeight;
            listDiv.style.zIndex = '1';
            listDiv.style.top = ($(".EIMS_C_10002_6_ui-btn").height() + $(".EIMS_C_10002_6_ui-btn").offset().top + 1) + "px";
            //listDiv.style.left=temp.style.offsetLeft+"px";
            listDiv.style.width = temp.offsetWidth + "px";

            listDiv.style.backgroundColor = "#D7D7D7";

            //listDiv.style.opacity='0.5';
            //listDiv.style.filter="alpha(opacity=80)";
            listDiv.style.opacity = '0.9';


            var msgListDdl = $("#EIMS_C_10002_6_Type_ddl")[0];
            var innerHtml = "<ul style='list-style:none;cursor:pointer;'>";
            for (var i = 0; i < msgListDdl.children.length; i++) {
                innerHtml += "<li onmousemove='this.style.backgroundColor=\"#4b6c9e\";' onmouseout='this.style.backgroundColor=\"\";' onclick='EIMS_C_10002_6.selectMsgType(this)' value='" + msgListDdl.children[i].value + "'>" + msgListDdl.children[i].innerHTML + "</li>";
            }
            innerHtml += "</ul>";

            listDiv.innerHTML = innerHtml;
            document.body.appendChild(listDiv);
        }
    },
    selectMsgType: function (obj) { //选择留言类型
        $("#EIMS_C_10002_6_Type_ddl").val(obj.value);
        if (obj.value > 0) {
            $(".EIMS_C_10002_6_ui-btn-text").html(obj.innerHTML);
        } else {
            $(".EIMS_C_10002_6_ui-btn-text").html("请选择留言类型");
        }

        alert($('#EIMS_C_10002_6_MsgTypeList_div'));

        //关闭弹出的div层
        $('#EIMS_C_10002_6_MsgTypeList_div').remove();
    },

    CheckMsgInfo: function () { //验证留言提交字段
        if ($("#EIMS_C_10002_6_Type_ddl").length > 0) {
            var msgType = $("#EIMS_C_10002_6_Type_ddl"); //留言类型
            if (msgType.val() <= 0) {
                alert('请选择留言类型！');
                return false;
            }
        }

        if ($("#EIMS_C_10002_6_AuthorName_Div").length > 0) {
            var msgAuthorName = $("#EIMS_C_10002_6_AuthorName"); //联系人
            if (msgAuthorName.val() == "联系人" || msgAuthorName.val() == "") {
                alert("请输入联系人姓名！");
                msgAuthorName.focus();
                return false;
            }
        }

        if ($("#EIMS_C_10002_6_CompanyName").length > 0) {
            var msgCompany = $("#EIMS_C_10002_6_CompanyName"); //公司名称
            if (msgCompany.val() == "公司名称" || msgCompany.val() == "") {
                alert("请输入公司名称！");
                return false;
            }
        }

        if ($("#EIMS_C_10002_6_Telephone_Div").length > 0) {
            var isMobile = /^1[3-8]{1}\d{9}$/;
            var isNumber = /^[0-9]*$/;  //11位数
            var isNum = /^[0-9]*[1-9][0-9]*$/; //自然数
            var isLetter=/[^0-9.]/g;

            var msgMobile = $("#EIMS_C_10002_6_Telephone"); //用户手机号
            if (msgMobile.val() == "联系人手机" || msgMobile.val() == "") {
                alert("请输入联系人手机！");
                return false;
            }

            if (isLetter.test(msgMobile.val())) {
                alert("请输入正确的手机号码！");
                return false;
            }

            if (isNum.test(msgMobile.val())) {
                if (!isNumber.test(msgMobile.val())) {
                    alert("手机号码应为11位数字，以13/14/15/17/18开头！");
                    return false;
                }

                if (!isMobile.test(msgMobile.val())) {
                    alert("手机号码格式不正确，请重新输入！");
                    return false;
                }
            }
        }

        if ($("#EIMS_C_10002_6_Email_Div").length > 0) {
            var isEmail = /^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/;

            var msgEmail = $("#EIMS_C_10002_6_Email");
            if (msgEmail.val() == "Email" || msgEmail.val() == "") {
                alert("请输入联系人邮箱！");
                return false;
            }

            if (!isEmail.test(msgEmail.val())) {
                alert("邮箱格式不正确，请重新输入！");
                return false;
            }
        }

        if ($("#EIMS_C_10002_6_MsgContent").length > 0) {
            var msgContent = $("#EIMS_C_10002_6_MsgContent"); //留言内容
            if (msgContent.val() == "请输入留言内容..." || msgContent.val() == "") {
                alert('请输入留言内容！');
                return false;
            }
        }

        return true;
    },



    SubmitAdvisorys: function () {
        //提交验证
        if (!EIMS_C_10002_6.CheckMsgInfo()) {
            return false;
        }

        var Params = null;
        if (para == null) {
            alert("无效的参数！");
            return false;
        }

        if (para.indexOf(",") < 0) {
            return false;
        }

        var paras = para.split(',');
        var typeid = paras[0];
        var device = paras[1];
        var content = "";

        var magContent = $("#EIMS_C_10002_6_MsgContent").val();
        var company = $("#EIMS_C_10002_6_CompanyName").val();
        var authorName = $("#EIMS_C_10002_6_AuthorName").val();
        var email = $("#EIMS_C_10002_6_Email").val();
        var mobile = $("#EIMS_C_10002_6_Telephone").val();

        var content = "<Submit>\
                            <Content>" + magContent + "</Content>\
                            <Company>" + company + "</Company>\
                            <AuthorName>" + authorName + "</AuthorName>\
                            <Email>" + email + "</Email>\
                            <Mobile>" + mobile + "</Mobile>\
                      </Submit>";

        Params = { "TypeId": typeid, "Device": device, "content": content };

        AjaxMethod("Common", "SubmitAdvisorys", Params, function (data) {
            if (IsNullOrEmpty(data)) {
                return;
            }

            if (data.result != 1) {
                return;
            }

            alert("提交留言成功！");
            document.location.reload();
        });

    },

    CancelMsg: function () {    //取消留言
        $("#EIMS_C_10002_6_MsgContent").val("");
        $("#EIMS_C_10002_6_CompanyName").val("");
        $("#EIMS_C_10002_6_AuthorName").val("");
        $("#EIMS_C_10002_6_Telephone").val("");
        $("#EIMS_C_10002_6_Email").val("");
        $("#EIMS_C_10002_6_postText").val("");
    }
}
/*end_xn_mc_feedback_2_wrap*/

/*xn_mc_solutionv_6_wrap*/
$(function(){
    if ($("#xn_mc_solutionv_6_wrap").length>0) {
        var oTop_ul=$("#xn_mc_solutionv_6_tul");
        var oTop_li=oTop_ul.children("li");
        var oCurr="xn_mc_solutionv_6_tlicurr";
        var oCon_ul=$("#xn_mc_solutionv_6_cul");
        var oCon_li=oCon_ul.children("li");
        var _this=null;

        oTop_li.css({"width":oTop_ul.outerWidth(true)/3,"margin":0,"padding":0,"border":0}).first().addClass(oCurr);

        oTop_li.click(function(){
            _this=$(this).index();
            $(this).addClass(oCurr).siblings().removeClass(oCurr);
            oCon_li.eq(_this).show().siblings().hide();
        })

        oCon_li.hide();
        oCon_li.first().show();

        //对滑动事件的处理
        var dragDistance = 100 ;
        var dragY = 20;
        var oCon_HammerOne=HammerOne(oCon_ul);//类别说明-图片
        var _index=null;

        oCon_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            _index=$("."+oCurr).index();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < -dragDistance && ev.gesture.deltaY < dragY ){
                        _index++;
                        if (_index>oTop_li.length-1) {
                            _index=2;
                            return;
                        };
                        oTop_li.eq(_index).addClass(oCurr).siblings().removeClass(oCurr);
                        oCon_li.eq(_index).show().siblings().hide();
                    }else if (ev.gesture.deltaX > dragDistance && ev.gesture.deltaY < dragY) {
                        _index--;
                        if (_index<0) {
                            _index=0;
                            return;
                        };
                        oTop_li.eq(_index).addClass(oCurr).siblings().removeClass(oCurr);
                        oCon_li.eq(_index).show().siblings().hide();
                    };
                    break;
            }
        });
    };
})
/*end_xn_mc_solutionv_6_wrap*/

/*xn_mc_message_1_wrap*/
$(function(){
    try {
        if ($("#EIMS_C_10002_5_Main").length > 0) {
            EIMS_C_10002_5.Init();
        }
    } catch (err) { }
});
var EIMS_C_10002_5 = {


    Init: function () {
        $("#EIMS_C_10002_5_Params").val(para);
    },

    createMsgDiv: function () { //弹出一个div层
        var temp = $(".EIMS_C_10002_5_ui-btn")[0];
        if ($("#EIMS_C_10002_5_Type_ddl").length > 0) {
            var listDiv = document.createElement("DIV");
            listDiv.id = "EIMS_C_10002_5_MsgTypeList_div";
            listDiv.style.position = "absolute";
            listDiv.style.width = document.body.scrollWidth;
            listDiv.style.height = document.documentElement.offsetHeight;
            listDiv.style.zIndex = '1';
            listDiv.style.top = ($(".EIMS_C_10002_5_ui-btn").height() + $(".EIMS_C_10002_5_ui-btn").offset().top + 1) + "px";
            //listDiv.style.left=temp.style.offsetLeft+"px";
            listDiv.style.width = temp.offsetWidth + "px";

            listDiv.style.backgroundColor = "#D7D7D7";

            //listDiv.style.opacity='0.5';
            //listDiv.style.filter="alpha(opacity=80)";
            listDiv.style.opacity = '0.9';


            var msgListDdl = $("#EIMS_C_10002_5_Type_ddl")[0];
            var innerHtml = "<ul style='list-style:none;cursor:pointer;'>";
            for (var i = 0; i < msgListDdl.children.length; i++) {
                innerHtml += "<li onmousemove='this.style.backgroundColor=\"#4b6c9e\";' onmouseout='this.style.backgroundColor=\"\";' onclick='EIMS_C_10002_5.selectMsgType(this)' value='" + msgListDdl.children[i].value + "'>" + msgListDdl.children[i].innerHTML + "</li>";
            }
            innerHtml += "</ul>";

            listDiv.innerHTML = innerHtml;
            document.body.appendChild(listDiv);
        }
    },
    selectMsgType: function (obj) { //选择留言类型
        $("#EIMS_C_10002_5_Type_ddl").val(obj.value);
        if (obj.value > 0) {
            $(".EIMS_C_10002_5_ui-btn-text").html(obj.innerHTML);
        } else {
            $(".EIMS_C_10002_5_ui-btn-text").html("请选择留言类型");
        }

        alert($('#EIMS_C_10002_5_MsgTypeList_div'));

        //关闭弹出的div层
        $('#EIMS_C_10002_5_MsgTypeList_div').remove();
    },

    CheckMsgInfo: function () { //验证留言提交字段
        if ($("#EIMS_C_10002_5_Type_ddl").length > 0) {
            var msgType = $("#EIMS_C_10002_5_Type_ddl"); //留言类型
            if (msgType.val() <= 0) {
                alert('请选择留言类型！');
                return false;
            }
        }

        if ($("#EIMS_C_10002_5_AuthorName_Div").length > 0) {
            var msgAuthorName = $("#EIMS_C_10002_5_AuthorName"); //联系人
            if (msgAuthorName.val() == "联系人" || msgAuthorName.val() == "") {
                alert("请输入联系人姓名！");
                msgAuthorName.focus();
                return false;
            }
        }

        if ($("#EIMS_C_10002_5_CompanyName").length > 0) {
            var msgCompany = $("#EIMS_C_10002_5_CompanyName"); //公司名称

            switch(msgCompany.val()){
                case "满意":
                    break;
                case "良好":
                    break;
                case "一般":
                    break;
                default:
                    alert("您的输入有误！满意/良好/一般，请三选一");
                    return false;
            }
        }

        if ($("#EIMS_C_10002_5_Telephone_Div").length > 0) {
            var isMobile = /^1[3-8]{1}\d{9}$/;
            var isNumber = /^[0-9]*$/;  //11位数
            var isNum = /^[0-9]*[1-9][0-9]*$/; //自然数
            var isLetter=/[^0-9.]/g;

            var msgMobile = $("#EIMS_C_10002_5_Telephone"); //用户手机号
            if (msgMobile.val() == "联系人手机" || msgMobile.val() == "") {
                alert("请输入联系人手机！");
                return false;
            }

            if (isLetter.test(msgMobile.val())) {
                alert("请输入正确的手机号码！");
                return false;
            }

            if (isNum.test(msgMobile.val())) {
                if (!isNumber.test(msgMobile.val())) {
                    alert("手机号码应为11位数字，以13/14/15/17/18开头！");
                    return false;
                }

                if (!isMobile.test(msgMobile.val())) {
                    alert("手机号码格式不正确，请重新输入！");
                    return false;
                }
            }
        }

        if ($("#EIMS_C_10002_5_Email_Div").length > 0) {
            var isEmail = /^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/;

            var msgEmail = $("#EIMS_C_10002_5_Email");
            if (msgEmail.val() == "Email" || msgEmail.val() == "") {
                alert("请输入联系人邮箱！");
                return false;
            }

            if (!isEmail.test(msgEmail.val())) {
                alert("邮箱格式不正确，请重新输入！");
                return false;
            }
        }

        if ($("#EIMS_C_10002_5_MsgContent").length > 0) {
            var msgContent = $("#EIMS_C_10002_5_MsgContent"); //留言内容
            if (msgContent.val() == "请输入留言内容..." || msgContent.val() == "") {
                alert('请输入留言内容！');
                return false;
            }
        }

        return true;
    },

    SubmitAdvisorys: function () {
        //提交验证
        if (!EIMS_C_10002_5.CheckMsgInfo()) {
            return false;
        }

        var Params = null;
        if (para == null) {
            alert("无效的参数！");
            return false;
        }

        if (para.indexOf(",") < 0) {
            return false;
        }

        var paras = para.split(',');
        var typeid = paras[0];
        var device = paras[1];
        var content = "";

        var magContent = $("#EIMS_C_10002_5_MsgContent").val();
        var company = $("#EIMS_C_10002_5_CompanyName").val();
        var authorName = $("#EIMS_C_10002_5_AuthorName").val();
        var email = $("#EIMS_C_10002_5_Email").val();
        var mobile = $("#EIMS_C_10002_5_Telephone").val();

        var content = "<Submit>\
                            <Content>" + magContent + "</Content>\
                            <Company>" + company + "</Company>\
                            <AuthorName>" + authorName + "</AuthorName>\
                            <Email>" + email + "</Email>\
                            <Mobile>" + mobile + "</Mobile>\
                      </Submit>";

        Params = { "TypeId": typeid, "Device": device, "content": content };

        AjaxMethod("Common", "SubmitAdvisorys", Params, function (data) {
            if (IsNullOrEmpty(data)) {
                return;
            }

            if (data.result != 1) {
                return;
            }

            alert("提交留言成功！");
            document.location.reload();
        });

    },

    CancelMsg: function () {    //取消留言
        alert("取消留言将清空您输入的内容！");
        $("#EIMS_C_10002_5_MsgContent").val("");
        $("#EIMS_C_10002_5_CompanyName").val("");
        $("#EIMS_C_10002_5_AuthorName").val("");
        $("#EIMS_C_10002_5_Telephone").val("");
        $("#EIMS_C_10002_5_Email").val("");
    }
}
/*end_xn_mc_message_1_wrap*/

/*xn_mc_prodv_30_wrap*/
$(function() {
    if ($("#xn_mc_prodv_30_wrap").length>0) {
        var iSpeed=500;
        var oBigbox=$("#xn_mc_prodv_30_bigbox");
        var oBigul=$("#xn_mc_prodv_30_big");
        var oBigli=oBigul.children("li");

        var oSmaul=$("#xn_mc_prodv_30_sma");
        var pSmalicurr="xn_mc_prodv_30_smalicurr";

        var oPrevBtn=$("#xn_mc_prodv_30_prev");
        var oNextBtn=$("#xn_mc_prodv_30_next");
        var iCount=2;//走动的个数
        var iNumber=0;//计数器

        oSmaul.width(oSmaul.children("li").length*oSmaul.children("li").outerWidth(true));
        oBigli.width($(window).width()).hide();
        oBigli.first().show();
        var oBigli_w=oBigli.outerWidth(true);
        oSmaul.children("li").first().addClass(pSmalicurr);

        oBigli.each(function(){
            $(this).attr("index",$(this).index());
        })

        oNextBtn.click(function() {
            nextscroll();
        });
        oPrevBtn.click(function() {
            prevscroll();
        });

        function nextscroll() {
            if (! oSmaul.is(":animated")) {
                iNumber++;
                if (iNumber>oBigli.length-1) {
                    iNumber=oBigli.length-1;
                    return;
                };

                oBigli.eq(iNumber).show().siblings().hide();
                oSmaul.children("li").eq(iNumber).addClass(pSmalicurr).siblings().removeClass(pSmalicurr);

                if (iNumber>iCount) {
                    oSmaul.animate({"left":-(iNumber-iCount) * oSmaul.children("li").outerWidth(true)},iSpeed)
                };
            };
        };
        function prevscroll() {
            if (! oSmaul.is(":animated")) {
                iNumber--;
                if (iNumber<0) {
                    iNumber=0;
                    return;
                };

                oBigli.eq(iNumber).show().siblings().hide();
                oSmaul.children("li").eq(iNumber).addClass(pSmalicurr).siblings().removeClass(pSmalicurr);

                if (iNumber<oBigli.length-iCount) {
                    oSmaul.animate({"left":-(iNumber) * oSmaul.children("li").outerWidth(true)},iSpeed)
                }
            };
        };

        oSmaul.children("li").click(function(){
            iNumber=$(this).index();
            oBigli.eq(iNumber).show().siblings().hide();
            $(this).addClass(pSmalicurr).siblings().removeClass(pSmalicurr);
        });

        var dragDistance = 10 ;
        var dragTime = 200;
        var oTop_HammerOne=HammerOne(oBigbox);//图片
        oTop_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextscroll();
                        }
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevscroll();
                        }
                    }
                    break;
                default:
            }
        });
    };
})
/*end_xn_mc_prodv_30_wrap*/

/*xn_mc_case_21_wrap*/
$(function(){
    if($("#xn_mc_case_21_wrap").length > 0){
        var oWrap=$("#xn_mc_case_21_wrap");
        var oTop_ul = $("#xn_mc_case_21_tul");
        var oTop_li = oTop_ul.children("li");
        var oTop_li_length=oTop_li.length;
        var oTop_li_width=oTop_li.outerWidth(true);
        var oCon_ulWrap = $("#xn_mc_case_21_bbox");
        var oCon_ul = $("#xn_mc_case_21_boul");
        var oCon_li = oCon_ul.find(".xn_mc_case_21_boli");
        var currClass = "xn_mc_case_21_tCurr";
        var speed = 500;
        var iNumber=3;     //控制每屏显示的栏目个数

        oTop_ul.width(100*oTop_li_length+"%");
        oTop_li.outerWidth(100/oTop_li_length/iNumber+"%").css({"border":"none","margin":"0px","padding":"0px"});

        oTop_li.first().addClass(currClass);
        oCon_li.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
        });

        oCon_li.css("width",$(window).width()).hide();
        oCon_li.first().show();


        var idx = 1;

        //点击焦点图切换：
        oTop_li.first().addClass(currClass);

        oTop_li.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            _this.addClass(currClass).siblings().removeClass(currClass);
            var _thisIndex=$(".xn_mc_case_21_tCurr").index();
            oCon_li.eq(_thisIndex).show().siblings().hide();
        });

        //左右切换：
        function nextImg(){
            if(idx < oCon_li.length){
                oTop_li.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                if (idx>=iNumber) {
                    oTop_li.eq(idx-iNumber).addClass("xn_mc_case_21_control");//往前走添加class名
                    var _thisIndex=$(".xn_mc_case_21_tCurr").index();
                    oCon_li.eq(_thisIndex).show().siblings().hide();
                };
                idx++;
            }
        }

        function prevImg(){
            if(idx > 1){
                var iMoveLeftNum=idx-2;
                oTop_li.eq(iMoveLeftNum).removeClass("xn_mc_case_21_control");//往回走移除添加的class名
                idx--;
                oTop_li.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
                var _thisIndex=$(".xn_mc_case_21_tCurr").index();
                oCon_li.eq(_thisIndex).show().siblings().hide();
            }
        }

        var dragDistance = 5 ;
        var dragTime = 200;
        var oTop_HammerOne=HammerOne(oWrap);//类别
        oTop_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }else{}
                    }
                    break;
                default:
            }
        });
    }
});
/*end_xn_mc_case_21_wrap*/

/*xn_mc_pro_30_wrap*/
$(function(){
    if($("#xn_mc_pro_30_wrap").length > 0){
        var oWrap=$("#xn_mc_pro_30_wrap");
        var oTop_ul = $("#xn_mc_pro_30_tul");
        var oTop_li = oTop_ul.children("li");
        var oTop_li_length=oTop_li.length;
        var oTop_li_width=oTop_li.outerWidth(true);
        var oCon_ulWrap = $("#xn_mc_pro_30_bbox");
        var oCon_ul = $("#xn_mc_pro_30_boul");
        var oCon_li = oCon_ul.find(".xn_mc_pro_30_boli");
        var currClass = "xn_mc_pro_30_tCurr";
        var speed = 500;
        var iNumber=3;     //控制每屏显示的栏目个数

        oTop_ul.width(100*oTop_li_length+"%");
        oTop_li.outerWidth(100/oTop_li_length/iNumber+"%").css({"border":"none","margin":"0px","padding":"0px"});

        oTop_li.first().addClass(currClass);
        oCon_li.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
        });

        oCon_li.css("width",$(window).width()).hide();
        oCon_li.first().show();


        var idx = 1;

        //点击焦点图切换：
        oTop_li.first().addClass(currClass);

        oTop_li.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            _this.addClass(currClass).siblings().removeClass(currClass);
            var _thisIndex=$(".xn_mc_pro_30_tCurr").index();
            oCon_li.eq(_thisIndex).show().siblings().hide();
        });

        //左右切换：
        function nextImg(){
            if(idx < oCon_li.length){
                oTop_li.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                if (idx>=iNumber) {
                    oTop_li.eq(idx-iNumber).addClass("xn_mc_pro_30_control");//往前走添加class名
                    var _thisIndex=$(".xn_mc_pro_30_tCurr").index();
                    oCon_li.eq(_thisIndex).show().siblings().hide();
                };
                idx++;
            }
        }

        function prevImg(){
            if(idx > 1){
                var iMoveLeftNum=idx-2;
                oTop_li.eq(iMoveLeftNum).removeClass("xn_mc_pro_30_control");//往回走移除添加的class名
                idx--;
                oTop_li.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
                var _thisIndex=$(".xn_mc_pro_30_tCurr").index();
                oCon_li.eq(_thisIndex).show().siblings().hide();
            }
        }

        var dragDistance = 5 ;
        var dragTime = 200;
        var oTop_HammerOne=HammerOne(oWrap);//类别
        oTop_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }else{}
                    }
                    break;
                default:
            }
        });
    }
});
/*end_xn_mc_pro_30_wrap*/


/*xn_mc_about_12_wrap*/
$(function(){
    if($("#xn_mc_about_12_wrap").length > 0){
        var $tUl = $("#xn_mc_about_12_tUl");
        var $tLi = $tUl.children("li");
        var $cUl = $("#xn_mc_about_12_cUl");
        var $cLi = $cUl.children("li");
        var $cWrap = $("#xn_mc_about_12_cWrap");
        var currClass = "xn_mc_about_12_tCurr";
        var speed = 500;

        $tLi.first().addClass(currClass);

        $cLi.css("width",$cWrap.width()).hide();
        $cLi.first().show();

        $tLi.click(function(){
            var _this=$(this).index();
            $(this).addClass(currClass).siblings().removeClass(currClass);
            $cLi.eq(_this).show().siblings().hide();
        });
    }
});
/*end_xn_mc_about_12_wrap*/


/*xn_mh_prodv_2_wrap*/
$(function(){
    if ($("#xn_mh_prodv_2_wrap").length>0) {
        var oBtn=$("#xn_mh_prodv_2_btn");
        var oType_ul=$("#xn_mh_prodv_2_main").children("ul");
        var oType_ul_li=oType_ul.children("li");
        var oMark=$("#xn_mh_prodv_2_mark");

        oType_ul.addClass("xn_mh_prodv_2_tUl").hide();//初始化样式

        oType_ul.children("ul").children("li").addClass("xn_mh_prodv_2_tLi");

        //处理点击事件
        oBtn.click(function(){
            if (oType_ul.is(":hidden")) {
                oType_ul.show();
                oMark.show();
            }else{
                oType_ul.hide();
                oMark.hide();
            };
        })

        //初始进入页面操作
        var url = window.location.href;
        var href;

        if(url.indexOf('?') != -1){
            var urlPara = url.split('?')[1].split('&');
            var typeid,id;
            for (var i = 0; i < urlPara.length; i++) {
                if (urlPara[i].indexOf('TypeId') != -1) {
                    typeid = urlPara[i].split('=')[1];

                } else if (urlPara[i].indexOf('FId') != -1)
                {} else {
                    id = urlPara[i].split('=')[1];
                }
            }
            if(typeid){
                var num = typeid.toString();
            }
        }

        //在三层类别中 循环出选中样式
        $("#xn_mh_prodv_2_main").find("li").each(function(){
            var _thisotype=$(this);
            href= _thisotype.find("a").attr("href");
            href.indexOf(typeid);
            if( href.indexOf(num)!==-1){
                _thisotype.parents(".xn_mh_prodv_2_tLi").addClass("xn_mh_prodv_2_tLicurr");
            }
        });

        $(".xn_mh_prodv_2_tLi").children("ul").remove();//去掉多余的二级三级
    };
})
/*end_xn_mh_prodv_2_wrap*/

/*xn_mh_products_2_wrap*/
$(function(){
    if ($("#xn_mh_products_2_wrap").length>0) {
        var oBtn=$("#xn_mh_products_2_btn");
        var oType_ul=$("#xn_mh_products_2_tUl");
        var oType_ul_li=oType_ul.children("li");
        var oMark=$("#xn_mh_products_2_mark");

        //处理点击事件
        oBtn.click(function(){
            if (oType_ul.is(":hidden")) {
                oType_ul.show();
                oMark.show();
            }else{
                oType_ul.hide();
                oMark.hide();
            };
        })

        //初始进入页面操作
        var url = window.location.href;
        var href;

        if(url.indexOf('?') != -1){
            var urlPara = url.split('?')[1].split('&');
            var typeid,id;
            for (var i = 0; i < urlPara.length; i++) {
                if (urlPara[i].indexOf('TypeId') != -1) {
                    typeid = urlPara[i].split('=')[1];

                } else if (urlPara[i].indexOf('FId') != -1)
                {} else {
                    id = urlPara[i].split('=')[1];
                }
            }
            if(typeid){
                var num = typeid.toString();
            }
        }

        //循环出选中样式
        oType_ul_li.each(function(){
            var _thisotype=$(this);
            href= _thisotype.find("a").attr("href");
            href.indexOf(typeid);
            if( href.indexOf(num)!==-1){
                _thisotype.addClass("xn_mh_products_2_tLicurr");
            }
        });
    };
})
/*end_xn_mh_products_2_wrap*/

/*xn_mc_news_12_wrap*/
$(function(){
    if($("#xn_mc_news_12_wrap").length > 0){
        var oWrap=$("#xn_mc_news_12_wrap");
        var oTop_ul = $("#xn_mc_news_12_tul");
        var oTop_li = oTop_ul.children("li");
        var oTop_li_length=oTop_li.length;
        var oTop_li_width=oTop_li.outerWidth(true);
        var oCon_ulWrap = $("#xn_mc_news_12_sub");
        var oCon_ul = $("#xn_mc_news_12_subUl");
        var oCon_li = oCon_ul.find(".xn_mc_news_12_subLi");
        var currClass = "xn_mc_news_12_tCurr";
        var concurr = "xn_mc_news_12_subcurr";
        var speed = 500;
        var iNumber=3;     //控制每屏显示的栏目个数

        oTop_ul.width(100*oTop_li_length+"%");
        oTop_li.width(100/oTop_li_length/iNumber+"%");

        oTop_li.first().addClass(currClass);
        oCon_li.first().addClass(concurr);
        oCon_li.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
            _this.attr("height",_this.height());
        });

        oCon_li.css({"width":$(window).width()});
        oCon_ul.css({"width":$(window).width() * oCon_li.length,"position":"relative","overflow":"hidden"});

        var idx = 1;

        //点击焦点图切换：
        oTop_li.first().addClass(currClass);

        oTop_li.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true) * _this.index()},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
            oCon_li.eq(_this.index()).addClass(concurr).siblings().removeClass(concurr);
            oCon_ul.css("height",oCon_li.eq(_this.index()).height());
        });

        //左右切换：
        function nextImg(){
            if(idx < oCon_li.length){
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*idx},speed);
                oTop_li.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                oCon_li.eq(idx).addClass(concurr).siblings().removeClass(concurr);

                oCon_ul.animate({"height":$("."+concurr).height()},speed);
                $("html,body").animate({"scrollTop":oWrap.offset().top},speed);

                if (idx>=iNumber) {
                    oTop_li.eq(idx-iNumber).addClass("xn_mc_news_12_control");//往前走添加class名
                };
                idx++;
            }else{
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*(oCon_li.length-1) - 100 +"px"},speed/oCon_li.length);
                oCon_ul.animate({"left":"-"+oCon_li.outerWidth(true)*(oCon_li.length-1)},speed/oCon_li.length);
            }
        }

        function prevImg(){
            if(idx > 1){
                var iMoveLeftNum=idx-2;
                oTop_li.eq(iMoveLeftNum).removeClass("xn_mc_news_12_control");//往回走移除添加的class名
                idx--;
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*(idx-1)},speed);
                oTop_li.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
                oCon_li.eq(idx-1).addClass(concurr).siblings().removeClass(concurr);

                oCon_ul.animate({"height":$("."+concurr).height()},speed);
                $("html,body").animate({"scrollTop":oWrap.offset().top},speed);

            }else{
                oCon_ul.stop().animate({"left":100+"px"},speed/oCon_li.length);
                oCon_ul.animate({"left":0},speed/oCon_li.length);
            }
        }

        $(".xn_mc_news_12_smore").click(function(){
            var _thisMore=$(this);
            _thisMore.find("input").val("正在加载中...");

            $.ajax({ url: "/m/news_list_more.aspx", success: function(){
                setTimeout(function(){
                    _thisMore.find("input").val("查看更多>>");
                    oCon_ul.css("height",_thisMore.parent().outerHeight(true));
                },300)
            }});
        })
        var dragDistance = 30 ;
        var dragTime = 200;
        var oTop_HammerOne=HammerOne(oTop_ul);//类别
        var oCon_HammerOne=HammerOne(oCon_ul);//类别说明-图片

        oTop_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }else{}
                    }
                    break;
                default:
            }
        });

        oCon_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }else{}
                    }
                    break;
                default:
            }
        });
    }
});
/*end_xn_mc_news_12_wrap*/


/*xn_mc_pro_29_wrap*/
$(function(){
    if($("#xn_mc_pro_29_wrap").length > 0){
        var oTop_ul = $("#xn_mc_pro_29_tul");
        var oTop_li = oTop_ul.children("li");
        var oTop_li_length=oTop_li.length;
        var oTop_li_width=oTop_li.outerWidth(true);
        var oCon_ulWrap = $("#xn_mc_pro_29_bbox");
        var oCon_ul = $("#xn_mc_pro_29_boul");
        var oCon_li = oCon_ul.find(".xn_mc_pro_29_boli");
        var currClass = "xn_mc_pro_29_tCurr";
        var speed = 500;
        var iNumber=3;     //控制每屏显示的栏目个数

        oTop_ul.width(100*oTop_li_length+"%");
        oTop_li.outerWidth(100/oTop_li_length/iNumber+"%").css({"border":"none","margin":"0px","padding":"0px"});

        oTop_li.first().addClass(currClass);
        oCon_li.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
        });

        oCon_li.css("width",$(window).width());
        oCon_ul.css("width",$(window).width() * oCon_li.length).css("position","relative");

        var idx = 1;

        //点击焦点图切换：
        oTop_li.first().addClass(currClass);

        oTop_li.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true) * _this.index()},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
        });

        //左右切换：
        function nextImg(){
            if(idx < oCon_li.length){
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*idx},speed);
                oTop_li.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                if (idx>=iNumber) {
                    oTop_li.eq(idx-iNumber).addClass("xn_mc_pro_29_control");//往前走添加class名
                };
                idx++;
            }else{
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*(oCon_li.length-1) - 100 +"px"},speed/oCon_li.length);
                oCon_ul.animate({"left":"-"+oCon_li.outerWidth(true)*(oCon_li.length-1)},speed/oCon_li.length);
            }
        }

        function prevImg(){
            if(idx > 1){
                var iMoveLeftNum=idx-2;
                oTop_li.eq(iMoveLeftNum).removeClass("xn_mc_pro_29_control");//往回走移除添加的class名
                idx--;
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*(idx-1)},speed);
                oTop_li.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
            }else{
                oCon_ul.stop().animate({"left":100+"px"},speed/oCon_li.length);
                oCon_ul.animate({"left":0},speed/oCon_li.length);
            }
        }

        var dragDistance = 5 ;
        var dragTime = 200;
        var oTop_HammerOne=HammerOne(oTop_ul);//类别
        var oCon_HammerOne=HammerOne(oCon_ulWrap);//类别说明-图片
        oTop_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }else{}
                    }
                    break;
                default:
            }
        });
        oCon_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }else{}
                    }
                    break;
                default:
            }
        });
    }
});
/*end_xn_mc_pro_29_wrap*/

/*xn_mc_faqv_4_wrap*/
$(function(){
    if ($("#xn_mc_faqv_4_wrap").length>0) {
        $("#xn_mc_faqv_4_wrap").find("img").removeAttr("width")
            .removeAttr("height")
            .removeAttr("border")
            .addClass("xn_mc_faqv_4_img")
            .next("span").remove();
    };
})
/*end_xn_mc_faqv_4_wrap*/

/*xn_mc_newsv_20_wrap*/
$(function(){
    if ($("#xn_mc_newsv_20_wrap").length>0) {
        var oTarget=$("#xn_mc_newsv_20_wrap");
        var contant=oTarget.find("span").text();
        var array=contant.split(/[ ，]+/);//以中文逗号或者空格分割
        oTarget.find("span").html("");
        for (var i = 0; i < array.length; i++) {
            oTarget.find("span")[0].innerHTML+="<em>"+array[i]+"</em>";
        };
    };
})
/*end_xn_mc_newsv_20_wrap*/

/*xn_mc_sv_type*/
$(function(){
    if ($("#xn_mc_sv_type").length>0) {
        var oLi=$("#xn_mc_sv_tUl").children("li");
        var href;
        var url = window.location.href;

        if(url.indexOf('?') != -1){
            var urlPara = url.split('?')[1].split('&');
            var typeid,id;
            for (var i = 0; i < urlPara.length; i++) {
                if (urlPara[i].indexOf('TypeId') != -1) {
                    typeid = urlPara[i].split('=')[1];

                } else if (urlPara[i].indexOf('FId') != -1)
                {} else {
                    id = urlPara[i].split('=')[1];
                }
            }
            if(typeid && id){
                var num = typeid.toString() + id.toString();
            }
        }

        oLi.each(function(){
            href= $(this).find("a").attr("href");
            href.indexOf(typeid);
            if( href.indexOf(id)===-1){
            }else{
                $(this).addClass("xn_mc_sv_tLi_curr");
            }
        })
        //对feedback进行操作
        $("#xn_mc_sv_tUl").append("<li class='xn_mc_sv_tfeed'><a href='/m/feedback.aspx?FId=n9:9:8'>在线咨询</a></li>");

        if(url.indexOf('?') != -1){
            var feed_url = url.split('?')[1].split();
            if (feed_url=="FId=n9:9:8") {
                $(".xn_mc_sv_tfeed").addClass("xn_mc_sv_tLi_curr");
            };
        }
    };
})
/*end_xn_mc_sv_type*/

/*xn_mc_pro_28_wrap*/
$(function(){
    if($("#xn_mc_pro_28_wrap").length > 0){
        var oTopBox=$("#xn_mc_pro_28_tnbox");
        var oTopUl=$("#xn_mc_pro_28_tul");
        var oTopLi=oTopUl.children("li");
        var oLeftBtn=$("#xn_mc_pro_28_leftBtn");
        var oRightBtn=$("#xn_mc_pro_28_rightBtn");
        var speed=500;

        oTopLi.each(function(){
            $(this).attr("yousb",$(this).index());
        });

        //计算遮罩层的高度
        $(".xn_mc_pro_28_btimg img").load(function(){
            oLeftBtn.height(oTopLi.height());
            oRightBtn.height(oTopLi.height());
        });

        oTopUl.prepend(oTopUl.children().last());

        oTopBox.css("left",oLeftBtn.outerWidth(true));
        oTopUl.width(oTopBox.outerWidth(true)*oTopLi.length).css("left",-oTopBox.outerWidth(true));
        oTopLi.width(oTopBox.outerWidth(true)).css({'margin':0,'padding':0});

        $(window).resize(function(){
            oTopBox.css("left",oLeftBtn.outerWidth(true));
            oTopUl.width(oTopBox.outerWidth(true)*oTopLi.length).css("left",-oTopBox.outerWidth(true));
            oTopLi.width(oTopBox.outerWidth(true)).css({'margin':0,'padding':0});
        });

        oLeftBtn.click(function(){
            moveLeft();
        });

        oRightBtn.click(function(){
            moveRight();
        });

        var dragDistance = 100 ;
        var oRoll_Box=HammerOne(oTopUl);//图片
        oRoll_Box.on('dragend',function(ev){
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            moveLeft();
                        }
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            moveRight();
                        }
                    }
                    break
                default:
            }
        });

        function moveLeft(){
            oTopUl.stop().animate({left:"-"+2*oTopBox.outerWidth(true) +"px"},speed,function(){
                oTopUl.append(oTopUl.children().first());
                oTopUl.css("left",-oTopBox.outerWidth(true));
            });
        }
        function moveRight(){
            oTopUl.css('left',-2*oTopBox.outerWidth(true));
            oTopUl.prepend(oTopUl.children().last());
            oTopUl.stop().animate({"left":-oTopBox.outerWidth(true)},speed,function(){

            });
        }
    }
});
/*end_xn_mc_pro_28_wrap*/

/*xn_mc_products_8_wrap*/
$(function(){
    if ($("#xn_mc_products_8_wrap").length>0) {
        var oLi=$(".xn_mc_products_8_tUl").children("li");
        var href;
        var url = window.location.href;

        if(url.indexOf('?') != -1){
            var urlPara = url.split('?')[1].split('&');
            var typeid,id;
            for (var i = 0; i < urlPara.length; i++) {
                if (urlPara[i].indexOf('TypeId') != -1) {
                    typeid = urlPara[i].split('=')[1];

                } else if (urlPara[i].indexOf('FId') != -1)
                {} else {
                    id = urlPara[i].split('=')[1];
                }
            }
            if(typeid && id){
                var num = typeid.toString() + id.toString();
            }
        }

        oLi.each(function(){
            href= $(this).find("a").attr("href");
            href.indexOf(typeid);
            if( href.indexOf(id)===-1){
            }else{
                $(this).addClass("xn_mc_products_8_tfsStyle");
            }
        })
    };
})
/*end_xn_mc_products_8_wrap*/



/*xn_mh_3_wrap*/
$(function(){
    if ($("#xn_mh_3_wrap").length>0) {
        var oWrap=$("#xn_mh_3_wrap");
        var oSearch=$("#xn_mh_3_search");
        var oBtn=$("#xn_mh_3_btn");
        oSearch.find("td").eq(0).addClass("xn_mh_3_left");
        oSearch.find("td").eq(1).addClass("xn_mh_3_right");

        oBtn.click(function(){
            oSearch.fadeIn();
            $("#logo").fadeOut();
            $(this).fadeOut();
            return false;
        });
        function stopPropagation(e) {
            if (e.stopPropagation)
                e.stopPropagation();
            else
                e.cancelBubble = true;
        }
        $(document).bind('click',function(){
            oSearch.fadeOut();
            $("#logo").fadeIn();
            oBtn.fadeIn();
        });
        oSearch.bind('click',function(e){
            stopPropagation(e);
        });
    };
})
/*end_xn_mh_3_wrap*/

/*xn_mc_pro_27_wrap*/
$(function(){
    if($("#xn_mc_pro_27_wrap").length > 0){
        var oTop_ul = $("#xn_mc_pro_27_tul");
        var oTop_li = oTop_ul.children("li");
        var oTop_li_length=oTop_li.length;
        var oTop_li_width=oTop_li.outerWidth(true);
        var oCon_ulWrap = $("#xn_mc_pro_27_bbox");
        var oCon_ul = $("#xn_mc_pro_27_boul");
        var oCon_li = oCon_ul.find(".xn_mc_pro_27_boli");
        var currClass = "xn_mc_pro_27_tCurr";
        var speed = 500;
        var iNumber=3;     //控制每屏显示的栏目个数

        $(".xn_index_tit").each(function(){
            $(this).attr("index",$(this).index());
        });


        oTop_li.first().addClass(currClass);
        oCon_li.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
        });

        oCon_li.css("width",$(window).width());
        oCon_ul.css("width",$(window).width() * oCon_li.length).css("position","relative");

        var idx = 1;

        //点击焦点图切换：
        oTop_li.first().addClass(currClass);

        oTop_li.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true) * _this.index()},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
        });

        //左右切换：
        function nextImg(){
            if(idx < oCon_li.length){
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*idx},speed);
                oTop_li.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                idx++;
            }else{
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*(oCon_li.length-1) - 100 +"px"},speed/oCon_li.length);
                oCon_ul.animate({"left":"-"+oCon_li.outerWidth(true)*(oCon_li.length-1)},speed/oCon_li.length);
            }
        }

        function prevImg(){
            if(idx > 1){
                idx--;
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*(idx-1)},speed);
                oTop_li.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
            }else{
                oCon_ul.stop().animate({"left":100+"px"},speed/oCon_li.length);
                oCon_ul.animate({"left":0},speed/oCon_li.length);
            }
        }

        var dragDistance = 5 ;
        var dragTime = 200;
        var oCon_HammerOne=HammerOne(oCon_ulWrap);//类别说明-图片
        oCon_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }else{}
                    }
                    break;
                default:
            }
        });
    }
});
/*end_xn_mc_pro_27_wrap*/



/*xn_mc_index_34_wrap*/
$(function(){
    if($("#xn_mc_index_34_wrap").length > 0){
        var oTop_ul = $("#xn_mc_index_34_ulbox");
        var oTop_li = oTop_ul.children("li");
        var oTop_li_length=oTop_li.length;
        var oTop_li_width=oTop_li.outerWidth(true);
        var speed = 500;
        var iNumber=3;     //控制每屏显示的栏目个数

        oTop_li.each(function(){
            $(this).attr("index",$(this).index());
        });

        oTop_ul.width(100*oTop_li_length+"%").css("position","relative");
        oTop_li.width(100/oTop_li_length/iNumber+"%");

        //左右切换：
        function nextImg(){
            oTop_ul.stop().animate({"left":"-"+oTop_li.outerWidth(true)},speed,function(){
                $(this).css("left",0);
                $(this).append($(this).children().first());
            });

        }

        function prevImg(){
            oTop_ul.css('left',-oTop_li.outerWidth(true)+"px");
            oTop_ul.prepend(oTop_ul.children().last());
            oTop_ul.stop().animate({"left":0},speed);
        }

        var dragDistance = 5 ;
        var dragTime = 200;
        var oTop_HammerOne=HammerOne(oTop_ul);//内容
        oTop_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }else{}
                    }
                    break;
                default:
            }
        });
    }
});
/*end_xn_mc_index_34_wrap*/


/*xn_mc_index_32_wrap*/
$(function(){
    if($("#xn_mc_index_32_wrap").length > 0){
        var oTop_ul = $("#xn_mc_index_32_tul");
        var oTop_li = oTop_ul.children("li");
        var oTop_li_length=oTop_li.length;
        var oTop_li_width=oTop_li.outerWidth(true);
        var oCon_ulWrap = $("#xn_mc_index_32_sub");
        var oCon_ul = $("#xn_mc_index_32_subUl");
        var oCon_li = oCon_ul.find(".xn_mc_index_32_subLi");
        var currClass = "xn_mc_index_32_tCurr";
        var speed = 500;
        var iNumber=3;     //控制每屏显示的栏目个数

        $(".xn_index_tit").each(function(){
            $(this).attr("index",$(this).index());
        });

        $(".xn_mc_index_32_smore").click(function(){
            var ab=$(this);
            setTimeout(function(){
                ab.parents(".xn_mc_index_32_subLi").find(".xn_index_tit").attr("index",1);
            },1000);
        });

        oTop_ul.width(100*oTop_li_length+"%");
        oTop_li.width(100/oTop_li_length/iNumber+"%").css({"border":"none","margin":"0px","padding":"0px"});

        oTop_li.first().addClass(currClass);
        oCon_li.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
        });

        oCon_li.css("width",$(window).width());
        oCon_ul.css("width",$(window).width() * oCon_li.length).css("position","relative");

        var idx = 1;

        //点击焦点图切换：
        oTop_li.first().addClass(currClass);

        oTop_li.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true) * _this.index()},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
        });

        //左右切换：
        function nextImg(){
            if(idx < oCon_li.length){
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*idx},speed);
                oTop_li.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                if (idx>=iNumber) {
                    oTop_li.eq(idx-iNumber).addClass("xn_mc_index_32_control");//往前走添加class名
                };
                idx++;
            }else{
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*(oCon_li.length-1) - 100 +"px"},speed/oCon_li.length);
                oCon_ul.animate({"left":"-"+oCon_li.outerWidth(true)*(oCon_li.length-1)},speed/oCon_li.length);
            }
        }

        function prevImg(){
            if(idx > 1){
                var iMoveLeftNum=idx-2;
                oTop_li.eq(iMoveLeftNum).removeClass("xn_mc_index_32_control");//往回走移除添加的class名
                idx--;
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*(idx-1)},speed);
                oTop_li.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
            }else{
                oCon_ul.stop().animate({"left":100+"px"},speed/oCon_li.length);
                oCon_ul.animate({"left":0},speed/oCon_li.length);
            }
        }

        var dragDistance = 5 ;
        var dragTime = 200;
        var oTop_HammerOne=HammerOne(oTop_ul);//类别
        var oCon_HammerOne=HammerOne(oCon_ulWrap);//类别说明-图片
        oTop_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }else{}
                    }
                    break;
                default:
            }
        });
        oCon_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }else{}
                    }
                    break;
                default:
            }
        });
    }
});
/*end_xn_mc_index_32_wrap*/


/*xn_mc_pro_26_wrap*/
$(function(){
    if($("#xn_mc_pro_26_wrap").length > 0){
        function clickMore(){
            var oTop_ul = $(".xn_mc_pro_26_scroll");
            var oTop_li = oTop_ul.children("li");
            var oTop_li_length=oTop_li.length;
            var oTop_li_width=oTop_li.outerWidth(true);


            var speed = 500;
            var iNumber=3;     //控制每屏显示的栏目个数

            $(".xn_index_tit").each(function(){
                $(this).attr("index",$(this).index());
            });

            oTop_ul.width(100*oTop_li_length+"%").css("position","relative");
            oTop_li.outerWidth(100/oTop_li_length/iNumber+"%");


            var idx = 1;

            //点击焦点图切换：

            oTop_li.click(function(){
                var _this = $(this);
                idx = _this.index()+1;
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true) * _this.index()},speed);
            });


            var dragDistance = 5 ;
            var dragTime = 200;
            var oTop_HammerOne=HammerOne(oTop_ul);//类别
            oTop_HammerOne.on('dragend',function(ev){
                ev.preventDefault();
                switch(ev.type){
                    case "dragend":
                        if(ev.gesture.deltaX < 0 ){
                            if(ev.gesture.deltaX < -dragDistance ){
                                $(this).stop().animate({"left":- $(this).children("li").outerWidth(true)},speed,function(){
                                    $(this).css("left",0);
                                    $(this).append($(this).children().first());
                                });
                            }else{}
                        }
                        if(ev.gesture.deltaX > 0){
                            if(ev.gesture.deltaX > dragDistance ){

                                $(this).css("left",- $(this).children("li").outerWidth(true));
                                $(this).prepend($(this).children().last());
                                $(this).stop().animate({"left":0},speed);


                            }else{}
                        }
                        break;
                    default:
                }
            });
        }
        clickMore();
        //加载更多按钮
        $(".xn_mc_pro_26_more").on("click",function(){
            var _this=$(this);
            $.ajax({ url: "/m/npro_list_more.aspx", success: function(){
                setTimeout(function(){
                    clickMore();
                },200);
            }});
        })
    }
});
/*end_xn_mc_pro_26_wrap*/


/*xn_mc_about_10_wrap*/
$(function(){
    if($("#xn_mc_about_10_wrap").length > 0){
        var $tUl = $("#xn_mc_about_10_tUl");
        var $tLi = $tUl.children("li");
        var $cUl = $("#xn_mc_about_10_cUl");
        var $cLi = $cUl.children("li");
        var $cWrap = $("#xn_mc_about_10_cWrap");
        var currClass = "xn_mc_about_10_tCurr";
        var speed = 500;
        $tLi.first().addClass(currClass);
        $cLi.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
        });

        $cLi.css("width",$cWrap.outerWidth(true));
        $cUl.css("width",$cLi.outerWidth(true) * $cLi.length).css("position","relative");

        var idx = 1;
        var size = $cLi.size();

        //点击焦点图切换：
        $tLi.first().addClass(currClass);
        $(".xn_mc_about_10_cImg img").load(function(){
            $cUl.css("height",$cLi.eq(0).outerHeight(true));
        });

        $tLi.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true) * _this.index(),"height":$cLi.eq(_this.index()).outerHeight(true)},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
        });

        //左右切换：
        function nextImg(){
            if(idx < $cLi.length){
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*idx,"height":$cLi.eq(idx).outerHeight(true)},speed);
                $tLi.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                idx++;
            }else{
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1) - 100 +"px"},speed/$cLi.length);
                $cUl.animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1)},speed/$cLi.length);
            }
        }

        function prevImg(){
            if(idx > 1){
                idx--;
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*(idx-1),"height":$cLi.eq(idx-1).outerHeight(true)});
                $tLi.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
            }else{

                $cUl.stop().animate({"left":100+"px"},speed/$cLi.length);
                $cUl.animate({"left":0},speed/$cLi.length);
            }
        }

        //拖动效果
        var dragDistance = 30 ;
        var oCon_HammerOne=HammerOne($cWrap);//类别说明-图片
        oCon_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }else{}
                    }
                    break;
                default:
            }
        });
        var iTime=200;//时间

        $(".xn_mc_about_10_smore").click(function(){
            var _this=$(this);
            $.ajax({ url: "/m/about_more.aspx", success: function(){
                iTime=iTime+100;
                setTimeout(function(){
                    $cUl.animate({"height":_this.parent("#xn_mc_about_10_cLi").outerHeight()});
                },iTime);
            }});
        })
    }
});
/*end_xn_mc_about_10_wrap*/


/*xn_mc_about_11_wrap*/
//2015.05.29  //
$(function(){
    if($("#xn_mc_about_11_wrap").length > 0){
        var $tUl = $("#xn_mc_about_11_tUl");
        var $tLi = $tUl.children("li");
        var $cUl = $("#xn_mc_about_11_cUl");
        var $cLi = $cUl.children("li");
        var $cWrap = $("#xn_mc_about_11_cWrap");
        var currClass = "xn_mc_about_11_tCurr";
        var speed = 500;
        $tLi.first().addClass(currClass);
        $cLi.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
        });

        $cLi.css("width",$cWrap.outerWidth(true));
        $cUl.css("width",$cLi.outerWidth(true) * $cLi.length).css("position","relative");

        var idx = 1;
        var size = $cLi.size();

        //点击焦点图切换：
        $tLi.first().addClass(currClass);
        $(".xn_mc_about_11_cImg img").load(function(){
            $cUl.css("height",$cLi.eq(0).outerHeight(true));
        });

        $tLi.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true) * _this.index(),"height":$cLi.eq(_this.index()).outerHeight(true)},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
        });

        //左右切换：
        function nextImg(){
            if(idx < $cLi.length){
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*idx,"height":$cLi.eq(idx).outerHeight(true)},speed);
                $tLi.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                idx++;
            }else{
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1) - 100 +"px"},speed/$cLi.length);
                $cUl.animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1)},speed/$cLi.length);
            }
        }

        function prevImg(){
            if(idx > 1){
                idx--;
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*(idx-1),"height":$cLi.eq(idx-1).outerHeight(true)});
                $tLi.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
            }else{

                $cUl.stop().animate({"left":100+"px"},speed/$cLi.length);
                $cUl.animate({"left":0},speed/$cLi.length);
            }
        }

        //拖动效果
        var dragDistance = 30 ;
        var oCon_HammerOne=HammerOne($cWrap);//类别说明-图片
        oCon_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }else{}
                    }
                    break;
                default:
            }
        });
        var iTime=200;//时间

        $(".xn_mc_about_11_smore").click(function(){
            var _this=$(this);
            $.ajax({ url: "/m/about_more.aspx", success: function(){
                iTime=iTime+100;
                setTimeout(function(){
                    $cUl.animate({"height":_this.parent("#xn_mc_about_11_cLi").outerHeight()});
                },iTime);
            }});
        })
    }
});
/*end_xn_mc_about_11_wrap*/




/*xn_mc_index_24_wrap*/
$(function(){
    if($("#xn_mc_index_24_wrap").length > 0){
        var $tUl = $("#xn_mc_index_24_tUl");
        var $tLi = $tUl.children("li");
        var $cUl = $("#xn_mc_index_24_cUl");
        var $cLi = $cUl.children("li");
        var $cWrap = $("#xn_mc_index_24_cWrap");
        var currClass = "xn_mc_index_24_tCurr";
        var speed = 500;
        var isAccordion = false;  //其中一个类别为手风琴效果

        $tLi.first().addClass(currClass);
        $cLi.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
        });

        $cLi.css("width",$cWrap.outerWidth(true));
        $cUl.css("width",$cLi.outerWidth(true) * $cLi.length).css("position","relative");

        var idx = 1;
        var size = $cLi.size();
        //点击焦点图切换：
        $tLi.first().addClass(currClass);
        $(".xn_mc_index_24_cImg img").load(function(){
            $cUl.css("height",$cLi.eq(0).outerHeight(true));
        });

        $tLi.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true) * _this.index(),"height":$cLi.eq(_this.index()).outerHeight(true)},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
        });

        //左右切换：

        function nextImg(){
            if(idx < $cLi.length){
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*idx,"height":$cLi.eq(idx).outerHeight(true)},speed);
                $tLi.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                idx++;
            }else{
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1) - 100 +"px"},speed/$cLi.length);
                $cUl.animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1)},speed/$cLi.length);
            }
        }

        function prevImg(){
            if(idx > 1){
                idx--;
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*(idx-1),"height":$cLi.eq(idx-1).outerHeight(true)});
                $tLi.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
            }else{

                $cUl.stop().animate({"left":100+"px"},speed/$cLi.length);
                $cUl.animate({"left":0},speed/$cLi.length);
            }
        }




        $cWrap.on('dragleft dragright dragend',function(ev){
            switch(ev.type){

                case "dragleft":
                    $cWrap.css("lef", -$cLi.outerWidth(true) + - ev.gesture.distance + "px");
                    break

                case "dragright":
                    $cWrap.css("right", -$cLi.outerWidth(true) + ev.gesture.distance + "px");
                    break

                case "dragend":
                    if(ev.gesture.deltaX < -50 ){  nextImg(); }
                    else if(ev.gesture.deltaX > 50){  prevImg(); }
                    else {$cWrap.animate({"left":-$cLi.outerWidth(true) +'px'},speed);}
                    break
            }

        })

        if(isAccordion == true){
            var _typeIndex = $("#xn_mc_index_24_type_3").index();
            var $main = $("#xn_mc_index_24_cUl li").eq(_typeIndex);

            $main.children().each(function(){
                $(this).find(".xn_mc_index_24_author").nextAll().wrapAll("<div class='xn_mc_index_24_contWrap'></div>");
                $(this).find(".xn_mc_index_24_cCont").prepend("<div class='xn_mc_index_24_view'>查看</div>");
                $(this).find(".xn_mc_index_24_contWrap").prevAll().wrapAll("<div class='xn_mc_index_24_colWrap'></div>");

            });
            $(".xn_mc_index_24_contWrap").hide();

            $(".xn_mc_index_24_colWrap").click(function(){
                $cUl.css("height","auto");
                if($(this).next().is(":visible") == true){
                    $(this).next().slideUp(speed);
                }else{
                    $(this).next().slideDown(speed);
                }

                if($(this).parent().parent().siblings().find(".xn_mc_index_24_contWrap").is(":visible") == true){
                    $(this).parent().parent().siblings().find(".xn_mc_index_24_contWrap").slideUp(speed);
                }


            });

        }

    }
});
/*end_xn_mc_index_24_wrap*/

/*xn_mc_index_25_wrap*/
$(function(){
    if($("#xn_mc_index_25_wrap").length > 0){
        var oTopBox=$("#xn_mc_index_25_tnbox");
        var oTopUl=$("#xn_mc_index_25_tul");
        var oTopLi=oTopUl.children("li");
        var oLeftBtn=$("#xn_mc_index_25_leftBtn");
        var oRightBtn=$("#xn_mc_index_25_rightBtn");
        var speed=500;

        oTopLi.each(function(){
            $(this).attr("yousb",$(this).index());
        });

        //计算遮罩层的高度
        $(".xn_mc_index_25_btimg img").load(function(){
            oLeftBtn.height(oTopLi.height());
            oRightBtn.height(oTopLi.height());
        });

        oTopUl.prepend(oTopUl.children().last());

        oTopBox.css("left",oLeftBtn.outerWidth(true));
        oTopUl.width(oTopBox.outerWidth(true)*oTopLi.length).css("left",-oTopBox.outerWidth(true));
        oTopLi.width(oTopBox.outerWidth(true)).css({'margin':0,'padding':0});

        $(window).resize(function(){
            oTopBox.css("left",oLeftBtn.outerWidth(true));
            oTopUl.width(oTopBox.outerWidth(true)*oTopLi.length).css("left",-oTopBox.outerWidth(true));
            oTopLi.width(oTopBox.outerWidth(true)).css({'margin':0,'padding':0});
        });

        oLeftBtn.click(function(){
            moveLeft();
        });

        oRightBtn.click(function(){
            moveRight();
        });

        var dragDistance = 100 ;
        var oRoll_Box=HammerOne(oTopUl);//图片
        oRoll_Box.on('dragend',function(ev){
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            moveLeft();
                        }
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            moveRight();
                        }
                    }
                    break
                default:
            }
        });

        function moveLeft(){
            oTopUl.stop().animate({left:"-"+2*oTopBox.outerWidth(true) +"px"},speed,function(){
                oTopUl.append(oTopUl.children().first());
                oTopUl.css("left",-oTopBox.outerWidth(true));
            });
        }
        function moveRight(){
            oTopUl.css('left',-2*oTopBox.outerWidth(true));
            oTopUl.prepend(oTopUl.children().last());
            oTopUl.stop().animate({"left":-oTopBox.outerWidth(true)},speed,function(){

            });
        }
    }
});
/*end_xn_mc_index_25_wrap*/

/*xn_mc_index_30_wrap*/
$(function(){
    var autoquee = false;                      //是否自动滚动
    var n = 3;                                //显示区域图片张数
    var i = 1;                               //当前显示第几张
    var sp = 500;                           //切换速度
    var cont = $(".xn_mc_index_30_inner");
    var cul = $(".xn_mc_index_30_ul");
    var cli = $(".xn_mc_index_30_ul li");
    var maxwin = cont.width();                //取得盒子宽度
    var liw = cli.outerWidth();              //取得li的宽度和margin-right的值
    var limw = cli.outerWidth(true)-liw;    //取得li的margin-right值
    var imgw = maxwin-(n-1)*(liw+limw);    //得出显示区域宽度
    var lih = cli.outerHeight();          //得到li自身高度不包括margin值
    var limh = cli.outerHeight(true);
    var mgtop =cli.css("margin-top");   //获取li margin-top的值
    var marlul = imgw-liw;             //ul的margin-left偏移值
    cul.css("margin-left",-marlul);
    cli.each(function(index, element) {
        $(this).attr("index",index);
    });
    cul.find("li:last").prependTo(cul);
    cli.css("width",imgw)
    cli.eq(0).css({"height":limh,"margin-top":"0"}).addClass("current");
    cli.eq(0).find(".xn_mc_index_30_zz").hide();
    cli.eq(0).find(".xn_mc_index_30_tl").fadeIn();

    if(autoquee){
        var auto = function() {
            prevImg();
        };
        var time = setInterval(auto, 3000);
        cul.onmouseover = function() {
            clearInterval(time);
        };
        cul.onmouseout = function() {
            time = setInterval(auto, 3000);
        };
    }

    $(".xn_mc_index_30_left,.xn_mc_index_30_right,#xn_mc_index_30_inner").hover(function(){
        clearInterval(time);
    },function(){
        time = setInterval(auto, 3000);
    });

    $(".xn_mc_index_30_left").click(function(){
        prevImg();
    });
    $(".xn_mc_index_30_right").click(function(){
        nextImg();
    });

    //点击左边滚动
    function prevImg(){
        cul.find("li").removeClass("current").find(".xn_mc_index_30_tl").fadeOut();
        cul.find("li .xn_mc_index_30_zz").fadeIn();
        cul.stop(true,false).animate({"margin-left":-(imgw+marlul)},sp,function(){
            $(this).css("margin-left",-(imgw-liw));
            $(this).find("li:first").appendTo(cul);
            cul.find("li").eq(i).addClass("current");
        });
        cul.find("li:first").stop(true,false).animate({"height":limh},sp,function(){
            $(this).css("height",lih);
            $(this).next().find(".xn_mc_index_30_zz").show();
        }).next().animate({"margin-top":mgtop,height:lih},sp).next().animate({"margin-top":0,height:limh},sp,function(){
            cul.find("li").eq(i).find(".xn_mc_index_30_zz").fadeOut();
            cul.find("li").eq(i).find(".xn_mc_index_30_tl").fadeIn();
        });
    };

    //点击右边滚动
    function nextImg(){
        cul.find("li").removeClass("current").find(".xn_mc_index_30_tl").fadeOut();
        cul.find("li:last").prependTo(cul);
        cul.find("li .xn_mc_index_30_zz").fadeIn();
        cul.css("margin-left",-(imgw+marlul)).animate({"margin-left":-(imgw-liw)},sp);
        cul.find("li:first").stop(true,false).animate({"height":lih},sp,function(){
            $(this).css("height",lih);
        }).next().animate({"margin-top":0,height:limh},sp).next().animate({"margin-top":mgtop,height:lih},sp,function(){
            cul.find("li").eq(i).addClass("current");
            cul.find("li").eq(i).find(".xn_mc_index_30_zz").fadeOut();
            cul.find("li").eq(i).find(".xn_mc_index_30_tl").fadeIn();
        });
    };
});
/*end_xn_mc_index_30_wrap*/



/*xn_mc_solutionv_3_wrap*/
$(function(){
    var bigImg = $("#xn_mc_solutionv_3_bigImg");
    var smallImg = $("#xn_mc_solutionv_3_smallImg_scroll");
    var leftBtn = $("#xn_mc_solutionv_3_leftBtn");
    var rightBtn = $("#xn_mc_solutionv_3_rightBtn");
    var smListLength = $(".xn_mc_solutionv_3_smallImgList").length;
    var smListWidth = $(".xn_mc_solutionv_3_smallImgList").outerWidth(true);
    var index = smallImg.outerWidth() / smListWidth;
    var indexSlide = Math.ceil(smListLength / index);

    smallImg.find(".xn_mc_solutionv_3_smallImg_box").children().first().addClass("xn_mc_solutionv_3_smallImgList_curr");

    smallImg.find(".xn_mc_solutionv_3_smallImg_box").find(".xn_mc_solutionv_3_smallImgList").each(function () {
        $(this).bind("click",function(){
            bigImg.css("display","none");
            $(this).siblings().removeClass("xn_mc_solutionv_3_smallImgList_curr");
            $(this).addClass("xn_mc_solutionv_3_smallImgList_curr");
            bigImg.html($(this).html()).fadeIn("slow");
        });
    });

    leftBtn.bind("click",function(){
        if($(".xn_mc_solutionv_3_smallImgList_curr").index() > "0"){
            $(".xn_mc_solutionv_3_smallImgList").eq($(".xn_mc_solutionv_3_smallImgList_curr").index()-1).click();
            smallImg.animate({"scrollLeft":smallImg.scrollLeft()-smListWidth},"slow");
        }
    })

    rightBtn.bind("click",function(){
        if($(".xn_mc_solutionv_3_smallImgList_curr").index() < smListLength){
            $(".xn_mc_solutionv_3_smallImgList").eq($(".xn_mc_solutionv_3_smallImgList_curr").index()+1).click();
            smallImg.animate({"scrollLeft":smallImg.scrollLeft()+smListWidth},"slow");
        }
    })

});
/*end_xn_mc_solutionv_3_wrap*/

/*xn_mc_index_26_wrap*/
$(function(){
    var oBox=$("#xn_mc_index_26_box");
    var oBul=$("#xn_mc_index_26_bul");
    var oBli=oBul.children("li");
    var oPop=$("#xn_mc_index_26_pop");
    var speed=300;
    var iMoveUp=80;  //控制上移的距离

    var oBcon=".xn_mc_index_26_bcon";
    var oBtopCurr="xn_mc_index_26_btopCurr";
    var oBclose="#xn_mc_index_26_bclose";
    var oBtop=".xn_mc_index_26_btop";
    var oBlogin="#xn_mc_index_26_loading";

    var _this;

    $("#xn_mc_index_26_blid1").click(function(){
        oTarMove($("#xn_mc_index_26_blid1")," #xn_mc_pro_23_wrap,#n_foot",oPro_23_wrap);
    });

    $("#xn_mc_index_26_blid2").click(function(){
        oTarMove($("#xn_mc_index_26_blid2")," #xn_mc_about_9_wrap,#n_foot",about_9_wrap);
    });

    $("#xn_mc_index_26_blid3").click(function(){
        oTarMove($("#xn_mc_index_26_blid3")," #xn_mc_case_16_wrap,#n_foot",case_16_wrap);
    });

    $("#xn_mc_index_26_blid4").click(function(){
        oTarMove($("#xn_mc_index_26_blid4")," #xn_mc_news_10_wrap,#n_foot",news_10_wrap);
    });

    function oTarMove(oTargetId,oZdy_bank,oBkuaiJs){

        if (oTargetId.attr("style")) {
            return false;
        };
        var _thisOfTop=oTargetId.offset().top-iMoveUp;

        oBox.stop().animate({top:-iMoveUp+"px"},speed,function(){
            oTargetId.stop().animate({top:-_thisOfTop+"px",zIndex:19999},speed);
            oTargetId.find(oBcon).stop().animate({height:$(window).height()+"px"},speed,function(){

                oTargetId.find(oBclose).show();
                oTargetId.find(oBtop).addClass(oBtopCurr);
                oTargetId.find(oBlogin).show();



                //弹出相应列表页    添加一个class作为判断条件   有则不加载
                if (!oTargetId.find(oBcon).hasClass("ifPro")) {

                    $.get(oTargetId.find("a").attr("href"), function(data){
                        data = $(data).find(oZdy_bank);
                        var html = data.wrap();

                        //可变代码
                        oTargetId.find(oBcon).html(html).addClass("ifPro");
                        oBkuaiJs();

                        //以下不能动
                        data.find("script").each(function() {
                            var script = $(this).html();

                            if (/^(\$|jQuery)/.test(script)) {
                                script = script.replace(/^\$[\s\S].*{/, "").replace(/\}[\n\r\s]*?\)/g, "})").replace(/\}\)[\s\n\r;]*$/,"");
                            }
                            eval(script);
                        });

                        data = null;
                    });
                };
            });
        });

        oTargetId.find(oBclose).click(function(){
            $(this).hide();
            oTargetId.find(oBtop).removeClass(oBtopCurr);

            oTargetId.find(oBcon).stop().animate({height:0+"px"},speed,function(){
                $(this).removeAttr("style");
            });

            oTargetId.stop().animate({top:-0+"px",zIndex:0},speed,function(){
                $(this).removeAttr("style");
                oBox.stop().animate({top:0},speed);
            });
            return false;
        });
    }
});
/*end_xn_mc_index_26_wrap*/



/*xn_acc_mid*/
$(function () {

    $("#xn_acc_mid .xn_acc_list h3").bind("click",function(){
        if($(this).next("ul").css('display')=='none'){
            $(".xn_acc_list ul").slideUp(200);
            $(this).next("ul").slideDown(200);
        }
        else {
            $(".xn_acc_list ul").slideUp(200);
        }
    })
    // 产品综合页面 pro.aspx 手风琴与类别内容嵌套显示
})
/*end_xn_acc_mid*/

/*popnavwarp*/
$(function () {
    $("#popnavbtn").bind('click',function(){
        var oD=$("#popnavbox").css('display')
        if(oD=='block'){
            $("#popnavbox").hide(200);
        }
        else {
            $("#popnavbox").show(200);
        }
    })
    $("#content,#head,#search,#cont_lx,#h_foot").bind('click',function(){
        var oD=$("#popnavbox").css('display')
        if(oD=='block'){
            $("#popnavbox").hide(200);
        }
    })
    // 弹出下拉菜单效果
})
/*end_popnavwarp*/

/*xn_mc_prolist_1_wrap*/
$(function () {
    var oXnBut1=$("#xn_mc_prolist_1_but");
    var oXnProList1=$("#xn_mc_prolist_1_tlist");
    var oXnProLbox=$("#xn_mc_prolist_1_lbox");
    var oXnHtml = oXnProLbox.html()+"";

    if(oXnHtml.trim()==""){ oXnBut1.css('display','none'); }
    else{ oXnBut1.css('display','block'); }

    oXnBut1.bind('click',function(){
        oXnProList1.show(200);
        $('body').append('<div class="mask" id="mask"></div>');
        $("#mask").bind('click',function(){
            oXnProList1.hide(200);
            $('#mask').remove();
        })
    })
    /// Product 产品列表页面 更多类别解决方案 end
})
/*end_xn_mc_prolist_1_wrap*/

/*xn_mc_products_2_aside*/
$(function(){
    var $aside = $("#xn_mc_products_2_aside");
    var $aside_width = $aside.outerWidth(true);
    var speed = 300;
    $aside.css("left",-$aside_width);
    var $main_left,$main_top,$main_right,$main_bottom;

    $("#xn_mn_products_3_wrap").click(function(event){
        event.stopPropagation();
        $("#ea_h").css("position","relative");
        if(parseInt($aside.css("left").split("px")) < 0){
            $aside.animate({left:0},speed,function(){
                $main_left = $aside.offset().left;
                $main_top  = $aside.offset().top;
                $main_right = $aside.outerWidth(true) + $main_left;
                $main_bottom = $aside.outerHeight(true) + $main_top;
            });
        }else{
            $aside.animate({left:-$aside_width},speed);
        }

    });

    function wipeToLeft(){
        $aside.animate({left:-$aside_width},speed);
    }

    $(document).click(function(event){
        var X = event.pageX;
        var Y = event.pageY;
        if(X < $main_left || X > $main_right || Y < $main_top || Y > $main_bottom){
            $aside.animate({left:-$aside_width},speed);
        }

    });

    $aside.wipetouch({
        tapToClick: false,		//滑动时禁止点击事件
        wipeLeft:function(){
            wipeToLeft();
        },
    });
});
/*end_xn_mc_products_2_aside*/

/*xn_mc_index_4_wrap*/
$(function(){
    var $main = $("#xn_mc_index_4_main");
    var $ul = $("#xn_mc_index_4_ul");
    var $li = $ul.children();
    var $window = $(window);
    var rows = 2;
    var sLeft = 50;  //默认滚动条位置

    rowsCount();
    function rowsCount(){
        if($li.length%rows==0){
            $ul.css("width",($li.length * $li.outerWidth(true))/rows);
        }else{
            $li.length = $li.length +1;
            $ul.css("width",($li.length * $li.outerWidth(true))/rows);
        }
    }

    $(window).resize(function(){
        rowsCount();
    });

    $main.scrollLeft(sLeft);
});
/*end_xn_mc_index_4_wrap*/

/*xn_mc_pro_5_wrap*/
$(function(){
    var rows = 2;
    var sLeft = 0;  //默认滚动条位置

    function rowsCount(){
        $(".xn_mc_pro_5_subType").each(function(){
            var $main = $(this);
            var $ul = $main.children("ul");
            var $li = $ul.children();
            var $items = $(".xn_mc_pro_5_items");
            var $items_id = "xn_mc_pro_5_items";
            $items.each(function(){
                $(this).attr("id",$items_id+$(this).index());//id生成
            });
            if($li.length%rows==0){
                $ul.css("width",($li.length * $li.outerWidth(true))/rows);
            }else{
                $li.length = $li.length +1;
                $ul.css("width",($li.length * $li.outerWidth(true))/rows);
            }
        });
    }

    rowsCount();
    $(window).resize(function(){
        rowsCount();
    });
});
/*end_xn_mc_pro_5_wrap*/

/*xn_mc_pro_18_wrap*/
$(function(){
    if ($("#xn_mc_pro_18_wrap").length>0) {
        var oSmall_ul_wrap_width=$(".xn_mc_pro_18_bbox").outerWidth(true);
        var oSmall_ul=$(".xn_mc_pro_18_scroll");
        var oSmall_li=oSmall_ul.children("li");
        var oSmall_li_length=oSmall_li.length;
        //var oSmall_li_width=oSmall_li.outerWidth(true);
        var speed=500;
        var iNumber=2;  //控制每屏显示li的个数

        oSmall_ul.css({"position":"relative"});//防止手动删除定位，所以写进html

        oSmall_ul.width(100*oSmall_li_length+"%");
        oSmall_li.width(100/oSmall_li_length/iNumber+"%");

        var dragDistance = 5 ;
        var dragTime = 200;
        var oTop_HammerOne=HammerOne(oSmall_ul);//类别
        oTop_HammerOne.on('dragend',function(ev){
            ev.gesture.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            $(this).parent().find(oSmall_ul).stop().animate({left:"-"+ oSmall_li.outerWidth(true) +"px"},speed,function(){
                                $(this).parent().find(oSmall_ul).append($(this).parent().find(oSmall_ul).children().first());
                                $(this).parent().find(oSmall_ul).css("left",0);
                            });
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            $(this).parent().find(oSmall_ul).css('left',-oSmall_li.outerWidth(true));
                            $(this).parent().find(oSmall_ul).prepend($(this).parent().find(oSmall_ul).children().last());
                            $(this).parent().find(oSmall_ul).stop().animate({"left":0},speed);
                        }else{}
                    }
                    break;
                default:
            }
        });


        //大图开始
        var oBigWrap=$(".xn_mc_pro_18_bigw");
        var oBig=$(".xn_mc_pro_18_big");
        var oBig_ul=$(".xn_mc_pro_18_big_ul");
        var oBig_bg=$(".xn_mc_pro_18_big_bg");
        var iBig_li_width;
        var iBig_li_length;


        $(".xn_mc_pro_18_big_con").css("position","relative");   //防止样式忘写，解决ie7下右边按钮问题

        //点击小图弹出大图
        oSmall_li.click(function(){

            var _parentsIndex=$(this).parents(".xn_mc_pro_18_box").index();//获取祖先元素的索引值
            if (oBig_ul.children().length==0) {
                oBig_ul.append($(this).clone(true));//操作数组，插入列表
                $(".xn_mc_pro_18_big_ul").find("li").removeAttr("style")//移除克隆过来的行间样式
            };

            oBigWrap.show();//显示大图
            oBig_bg.show();//显示背景

            // 始终在浏览器居中显示
            if($(window).height() > oBig.height()){
                oBig.css({"position":"relative","top":($(window).height()-oBig.height())/2});   //计算盒子的left/top值
                $(window).resize(function() {
                    oBig.css({"position":"relative","top":($(window).height()-oBig.height())/2});
                });
            }
        });


        //关闭弹出层
        $(".xn_mc_pro_18_big_close").click(function(){
            oBigWrap.hide();
            oBig_bg.hide();
            oBig_ul.children().remove();//关闭时，清空当前ul下的所有内容
        });
    };
});
/*end_xn_mc_pro_18_wrap*/





/*xn_mc_pro_21_wrap*/
$(function(){
    if($("#xn_mc_pro_21_wrap").length > 0){
        var oTop_ul = $("#xn_mc_pro_21_tul");
        var oTop_li = oTop_ul.children("li");
        var oTop_li_length=oTop_li.length;
        var oTop_li_width=oTop_li.outerWidth(true);
        var oCon_ulWrap = $("#xn_mc_pro_21_bbox");
        var oCon_ul = $("#xn_mc_pro_21_boul");
        var oCon_li = oCon_ul.find(".xn_mc_pro_21_boli");
        var currClass = "xn_mc_pro_21_tCurr";
        var speed = 500;
        var iNumber=3;     //控制每屏显示的栏目个数

        $(".xn_index_tit").each(function(){
            $(this).attr("index",$(this).index());
        });

        oTop_ul.width(100*oTop_li_length+"%");
        oTop_li.outerWidth(100/oTop_li_length/iNumber+"%");

        oTop_li.first().addClass(currClass);
        oCon_li.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
        });

        oCon_li.css("width",$(window).width());
        oCon_ul.css("width",$(window).width() * oCon_li.length).css("position","relative");

        var idx = 1;

        //点击焦点图切换：
        oTop_li.first().addClass(currClass);

        oTop_li.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true) * _this.index()},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
        });

        //左右切换：
        function nextImg(){
            if(idx < oCon_li.length){
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*idx},speed);
                oTop_li.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                if (idx>=iNumber) {
                    oTop_li.eq(idx-iNumber).addClass("xn_mc_pro_21_control");//往前走添加class名
                };
                idx++;
            }else{
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*(oCon_li.length-1) - 100 +"px"},speed/oCon_li.length);
                oCon_ul.animate({"left":"-"+oCon_li.outerWidth(true)*(oCon_li.length-1)},speed/oCon_li.length);
            }
        }

        function prevImg(){
            if(idx > 1){
                var iMoveLeftNum=idx-2;
                oTop_li.eq(iMoveLeftNum).removeClass("xn_mc_pro_21_control");//往回走移除添加的class名
                idx--;
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*(idx-1)},speed);
                oTop_li.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
            }else{
                oCon_ul.stop().animate({"left":100+"px"},speed/oCon_li.length);
                oCon_ul.animate({"left":0},speed/oCon_li.length);
            }
        }

        var dragDistance = 5 ;
        var dragTime = 200;
        var oTop_HammerOne=HammerOne(oTop_ul);//类别
        var oCon_HammerOne=HammerOne(oCon_ulWrap);//类别说明-图片
        oTop_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }else{}
                    }
                    break;
                default:
            }
        });
        oCon_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }else{}
                    }
                    break;
                default:
            }
        });
    }
});
/*end_xn_mc_pro_21_wrap*/



/*xn_mc_pro_23_wrap*/
$(function(){
    oPro_23_wrap();
});

function oPro_23_wrap(){
    if($("#xn_mc_pro_23_wrap").length > 0){
        var oTop_ul = $("#xn_mc_pro_23_tul");
        var oTop_li = oTop_ul.children("li");
        var oTop_li_length=oTop_li.length;
        var oTop_li_width=oTop_li.outerWidth(true);
        var oCon_ulWrap = $("#xn_mc_pro_23_bbox");
        var oCon_ul = $("#xn_mc_pro_23_boul");
        var oCon_li = oCon_ul.find(".xn_mc_pro_23_boli");
        var currClass = "xn_mc_pro_23_tCurr";
        var speed = 500;
        var iNumber=3;     //控制每屏显示的栏目个数
        //点击弹出大图
        var oBul=$(".xn_mc_pro_23_btul");
        var oPop=$("#xn_mc_pro_23_pop");
        var oPclose=$("#xn_mc_pro_23_pclose");

        var oZdy_bank=" #xn_mc_prodv_4_wrap,#n_foot";//控制加载的内容

        $(".xn_index_tit").each(function(){
            $(this).attr("index",$(this).index());
        });

        oTop_ul.width(100*oTop_li_length+"%");
        oTop_li.width(100/oTop_li_length/iNumber+"%");

        oTop_li.first().addClass(currClass);
        oCon_li.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
        });

        oCon_li.css("width",oCon_ulWrap.outerWidth(true));
        oCon_ul.css("width",oCon_li.outerWidth(true) * oCon_li.length).css("position","relative");

        var idx = 1;

        //点击焦点图切换：
        oTop_li.first().addClass(currClass);

        oTop_li.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true) * _this.index()},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
        });

        //左右切换：
        function nextImg(){
            if(idx < oCon_li.length){
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*idx},speed);
                oTop_li.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                if (idx>=iNumber) {
                    oTop_li.eq(idx-iNumber).addClass("xn_mc_pro_23_control");//往前走添加class名
                };
                idx++;
            }else{
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*(oCon_li.length-1) - 100 +"px"},speed/oCon_li.length);
                oCon_ul.animate({"left":"-"+oCon_li.outerWidth(true)*(oCon_li.length-1)},speed/oCon_li.length);
            }
        }

        function prevImg(){
            if(idx > 1){
                var iMoveLeftNum=idx-2;
                oTop_li.eq(iMoveLeftNum).removeClass("xn_mc_pro_23_control");//往回走移除添加的class名
                idx--;
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*(idx-1)},speed);
                oTop_li.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
            }else{
                oCon_ul.stop().animate({"left":100+"px"},speed/oCon_li.length);
                oCon_ul.animate({"left":0},speed/oCon_li.length);
            }
        }

        function opopBigBox(){
            var oBli=oBul.children("li");
            var _this;
            var _scrollTop;

            oBli.click(function(){


                _scrollTop=$(document).scrollTop();// 获取滚动条到顶部的距离

                _this=$(this);
                $(this).stop().animate({top:-20+"px"},speed,function(){
                    oPop.show().height($(window).height());

                    //弹出相应详情页
                    $('#xn_mc_pro_23_pcon').load($(this).find("a").attr("href")+oZdy_bank,function(){
                        $("#xn_mc_pro_23_loading").hide();
                    });

                    $("#xn_mc_pro_23_wrap").css({overflow:"hidden",height:0});
                    $("#xn_mc_pro_23_bbox").hide();
                    $("#ea_b").hide();
                })
            });

            oPclose.click(function(){
                oPop.hide();
                oBli.stop().animate({top:0},speed)

                $("#xn_mc_pro_23_loading").show();
                $('#xn_mc_pro_23_pcon').empty();

                $("#xn_mc_pro_23_wrap").removeAttr("style").css({height:"auto",overflow:"auto"});;
                $("#xn_mc_pro_23_bbox").show();
                $("#ea_b").removeAttr("style");
                $("html,body").animate({scrollTop:_scrollTop},1/1000)//关闭时回到之前浏览的位置
            });
        }
        opopBigBox();

        $(".xn_mc_pro_23_smore").click(function(){
            setTimeout(function(){
                opopBigBox();
            },1000);
        });

        var dragDistance = 100 ;
        var dragTime = 200;
        var oTop_HammerOne=HammerOne(oTop_ul);//类别
        var oCon_HammerOne=HammerOne(oCon_ulWrap);//类别说明-图片
        oTop_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }else{}
                    }
                    break;
                default:
            }
        });
        oCon_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }else{}
                    }
                    break;
                default:
            }
        });
    }
}
/*end_xn_mc_pro_23_wrap*/
/*xn_mc_pro_31_wrap*/
$(function(){
    if($("#xn_mc_pro_31_wrap").length>0){
        var $li=$(".xn_mc_pro_31_list").children("li");
        $li.on("touchstart",function(){$(this).addClass("hover");})
        $li.on("touchend",function(){$(this).removeClass("hover");})
    }
})
/*end_xn_mc_pro_31_wrap*/



/*xn_mc_prodv_3_wrap*/
$(function(){
    var rows = 1;
    var sLeft = 0;  //默认滚动条位置

    function rowsCount(){
        $(".xn_mc_prodv_3_main").each(function(){
            var $main = $(this);
            var $ul = $main.children("ul");
            var $li = $ul.children();
            var $items = $(".xn_mc_prodv_3_ul");
            var $items_id = "xn_mc_prodv_3_ul";
            $items.each(function(){
                $(this).attr("id",$items_id+$(this).index());//id生成
            });
            if($li.length%rows==0){
                $ul.css("width",($li.length * $li.outerWidth(true))/rows);
            }else{
                $li.length = $li.length +1;
                $ul.css("width",($li.length * $li.outerWidth(true))/rows);
            }
        });
    }

    rowsCount();
    $(window).resize(function(){
        rowsCount();
    });
});
/*end_xn_mc_prodv_3_wrap*/

/*xn_mc_news_2_wrap*/
/*2015-05-28改滑动事件*/
$(function(){
    if($("#xn_mc_news_2_wrap").length > 0){
        var $wrap = $("#xn_mc_news_2_wrap");
        var $main = $("#xn_mc_news_2_main");
        var $ul = $("#xn_mc_news_2_ul");
        var $li = $ul.children("li");
        var $lights = $("#xn_mc_news_2_lights");
        var speed =300;
        var $curr_class = "xn_mc_news_2_lightsCurr";

        $li.css("width",$main.outerWidth(true));
        $ul.css("width",$li.length * $li.outerWidth(true));

        //循环追加焦点图：
        $li.each(function(){
            $lights.append("<span></span>");
        });

        $li.each(function(){
            $(this).attr("lights",$(this).index());
        });

        var idx;
        var size = $li.size();
        //点击焦点图切换：
        $lights.children().first().addClass($curr_class);
        $lights.children("span").click(function(){
            var index = $(this).index();
            idx = parseInt($ul.children().first().attr("lights"));
            var num = index-idx;
            num = num>0?num:num+size;
            for(var i = 0;i < num ;i++){
                $ul.append($ul.children().first());
            }
            $ul.stop().animate({"left":0},speed);
            idx = $ul.children().first().attr("lights");
            $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);

            //$ul.animate({"left":-index*$li.outerWidth(true)},speed);
            //$(this).addClass($curr_class).siblings().removeClass($curr_class);
        });

        //左右切换：
        function nextImg(){
            $ul.stop().animate({left:"-"+$li.outerWidth(true) +"px"},speed,function(){
                $ul.append($ul.children().first());
                $ul.css("left",0);
                idx = $ul.children().first().attr("lights");
                $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
                return idx;
            });
        }

        function prevImg(){
            $ul.css('left',-$li.outerWidth(true));
            $ul.prepend($ul.children().last());
            $ul.stop().animate({"left":0},speed);

            idx = $ul.children().first().attr("lights");
            $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
        }

        //Touch事件绑定：
        var oHammerOne=HammerOne($li);
        var dragDistance = 100 ;
        oHammerOne.on('dragend',function(ev){
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }
                    }
                    break
                default:
            }
        });

    }
});
/*end_xn_mc_news_2_wrap*/

/*xn_mc_prodv_5_wrap*/
/*2015-05-28改滑动事件*/
$(function(){
    if($("#xn_mc_prodv_5_wrap").length > 0){
        var $wrap = $("#xn_mc_prodv_5_wrap");
        var $main = $("#xn_mc_prodv_5_main");
        var $ul = $("#xn_mc_prodv_5_ul");
        var $li = $ul.children("li");
        var $lights = $("#xn_mc_prodv_5_lights");
        var speed =300;
        var $curr_class = "xn_mc_prodv_5_lighsCurr";

        $li.css("width",$main.outerWidth(true));
        $ul.css("width",$li.length * $li.outerWidth(true));

        //循环追加焦点图：
        $li.each(function(){
            $lights.append("<span></span>");
        });

        $li.each(function(){
            $(this).attr("lights",$(this).index());
        });
        var idx;
        var size = $li.size();
        //点击焦点图切换：
        $lights.children().first().addClass($curr_class);
        $lights.children("span").click(function(){
            var index = $(this).index();
            idx = parseInt($ul.children().first().attr("lights"));
            var num = index-idx;
            num = num>0?num:num+size;
            for(var i = 0;i < num ;i++){
                $ul.append($ul.children().first());
            }
            $ul.stop().animate({"left":0},speed);
            idx = $ul.children().first().attr("lights");
            $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);

            //$ul.animate({"left":-index*$li.outerWidth(true)},speed);
            //$(this).addClass($curr_class).siblings().removeClass($curr_class);
        });

        //左右切换：
        function nextImg(){
            $ul.stop().animate({left:"-"+$li.outerWidth(true) +"px"},speed,function(){
                $ul.append($ul.children().first());
                $ul.css("left",0);
                idx = $ul.children().first().attr("lights");
                $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
                return idx;
            });
        }

        function prevImg(){
            $ul.css('left',-$li.outerWidth(true));
            $ul.prepend($ul.children().last());
            $ul.stop().animate({"left":0},speed);

            idx = $ul.children().first().attr("lights");
            $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
        }

        //Touch事件绑定：
        var dragDistance = 60 ;
        var oRoll_Box=HammerOne($li);//图片
        oRoll_Box.on('dragend',function(ev){
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }
                    }
                    break
                default:
            }
        });
    }
});
/*end_xn_mc_prodv_5_wrap*/

/*xn_mc_prodv_6_wrap*/
$(function(){
    if($("#xn_mc_prodv_6_wrap").length > 0){
        var $main = $(".xn_mc_prodv_6_main");
        var $col = $(".xn_mc_prodv_6_col");
        var speed  = 300;

        var $main_left,
            $main_top,
            $main_right,
            $main_bottom;

        $col.click(function(event){
            event.stopPropagation();
            $main.fadeIn(speed);

            $main_left = $main.offset().left;
            $main_top  = $main.offset().top;
            $main_right = $main.outerWidth(true) + $main_left;
            $main_bottom = $main.outerHeight(true) + $main_top;
        });

        $(document).click(function(event){
            var X = event.pageX;
            var Y = event.pageY;
            if(X < $main_left || X > $main_right || Y < $main_top || Y > $main_bottom){
                $main.fadeOut(speed);
            }

        });
    }
});
/*end_xn_mc_prodv_6_wrap*/

/*xn_mc_prodv_7_wrap*/
/*2015-05-28改滑动事件*/
$(function(){
    if($("#xn_mc_prodv_7_wrap").length > 0){
        var $wrap = $("#xn_mc_prodv_7_wrap");
        var $main = $("#xn_mc_prodv_7_main");
        var $left = $("#xn_mc_prodv_7_left");
        var $right = $("#xn_mc_prodv_7_right");
        var $ul = $("#xn_mc_prodv_7_ul");
        var $page = $("#xn_mc_prodv_7_pageIndex");
        var $curr_page = $("#xn_mc_prodv_7_currPage");
        var $total_page = $("#xn_mc_prodv_7_totalPages");
        var $li = $ul.children("li");

        var speed =300;
        var $curr_class = "";

        $li.css("width",$main.outerWidth(true));
        $ul.css("width",$li.length * $li.outerWidth(true));
        $page.css("left",($main.outerWidth(true) - $page.outerWidth(true) ) / 2 + "px");

        $li.each(function(){
            $(this).attr("lights",$(this).index());
        });

        $total_page.text($li.length);
        //左右切换：
        function nextImg(){
            $ul.stop().animate({left:"-"+$li.outerWidth(true) +"px"},speed,function(){
                $ul.append($ul.children().first());
                $ul.css("left",0);
                $curr_page.text(parseInt($ul.children().first().attr("lights")) + 1);
            });
        }

        function prevImg(){
            $ul.css('left',-$li.outerWidth(true));
            $ul.prepend($ul.children().last());
            $ul.stop().animate({"left":0},speed);
            $curr_page.text(parseInt($ul.children().first().attr("lights") )+ 1 );
        }

        $left.click(function(){
            nextImg();
        });
        $right.click(function(){
            prevImg();
        });

        //Touch事件绑定：
        var dragDistance = 60 ;
        var oRoll_Box=HammerOne($li);//图片
        oRoll_Box.on('dragend',function(ev){
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }
                    }
                    break
                default:
            }
        });
    }
});
/*end_xn_mc_prodv_7_wrap*/

/*xn_mc_pro_7_wrap*/
$(function(){
    function getSize(){
        $(".xn_mc_pro_7_li").each(function(){
            var $li_width = $(this).find(".xn_mc_pro_7_main").children("li").outerWidth();
            var $li_height = $(this).find(".xn_mc_pro_7_main").children("li").outerHeight(true);
            $(this).find(".xn_mc_pro_7_col").css("width",$li_width).css("height",$li_height);
        });
    };

    $("img").load(function(){
        getSize();
    });

    $(window).resize(function(){
        getSize();
    });

    $("#xn_mc_pro_7_moreBtn").click(function(){
        $.ajax({ url: "/m/npro_list_more.aspx", success: function(){
            getSize();
        }});
    });
});
/*end_xn_mc_pro_7_wrap*/

/*xn_mc_prodv_8_wrap*/
$(function(){
    if($("#xn_mc_prodv_8_wrap").length > 0){
        var smallCount = 3;
        var speed = 300;
        var lights_idx = 1;
        var $bigMain = $("#xn_mc_prodv_8_bigMain");
        var $bigUl = $("#xn_mc_prodv_8_bigUl");
        var $bigLi = $bigUl.children("li");
        var $smallMain = $("#xn_mc_prodv_8_smallMain");
        var $small = $("#xn_mc_prodv_8_smallUl");
        var $smallLi = $small.children("li");

        $small.children("li").css("width",parseInt($smallMain.outerWidth(true)/smallCount*0.96) +"px");
        $small.css("width",$small.children("li").length * $small.children("li").outerWidth(true));
        $bigLi.css("width",$bigMain.outerWidth(true));
        $bigUl.css("width",$bigUl.children("li").length * $bigUl.children("li").outerWidth(true));

        $bigLi.first().show();
        $small.children().eq(lights_idx).addClass("xn_mc_prodv_8_curr");

        $bigLi.each(function(){
            $(this).attr("lights",$(this).index());
        });

        $smallLi.each(function(){
            $(this).attr("small-lights",$(this).index());
        });

        var idx;
        var size = $bigLi.size();
        $smallLi.click(function(){
            // var index = $(this).index();

            var index = $(this).attr("small-lights");
            idx = parseInt($bigUl.children().first().attr("lights"));
            var click_index = $(this).index();

            var num = index-idx;
            num = num>0?num:num+size;
            for(var i = 0;i < num ;i++){
                $bigUl.append($bigUl.children().first());
            }
            $bigUl.stop().animate({"left":0},speed);
            idx = $bigUl.children().first().attr("lights");
            $small.children().eq(click_index).addClass("xn_mc_prodv_8_curr").siblings().removeClass("xn_mc_prodv_8_curr");

        });


        //左右切换：

        function nextImg(){
            $bigUl.stop().animate({left:"-"+$bigLi.outerWidth(true) +"px"},speed,function(){
                $bigUl.append($bigUl.children().first());
                $bigUl.css("left",0);

                idx = $bigUl.children().first().attr("lights");
                $small.children().eq(lights_idx).addClass("xn_mc_prodv_8_curr").siblings().removeClass("xn_mc_prodv_8_curr");

                return idx;
            });

        }

        function prevImg(){
            $bigUl.css('left',-$bigLi.outerWidth(true));
            $bigUl.prepend($bigUl.children().last());
            $bigUl.stop().animate({"left":0},speed);

            idx = $bigUl.children().first().attr("lights");
            $small.children().eq(lights_idx).addClass("xn_mc_prodv_8_curr").siblings().removeClass("xn_mc_prodv_8_curr");
        }

        function nextImg_small(){
            $small.stop().animate({left:"-"+$smallLi.outerWidth(true) +"px"},speed,function(){
                $small.append($small.children().first());
                $small.css("left",0);

                idx = $bigUl.children().first().attr("lights");
                $small.children().eq(lights_idx).addClass("xn_mc_prodv_8_curr").siblings().removeClass("xn_mc_prodv_8_curr");
                return idx;
            });

        }

        //小图滑动：
        function prevImg_small(){
            $small.css('left',-$smallLi.outerWidth(true));
            $small.prepend($small.children().last());
            $small.stop().animate({"left":0},speed);

            idx = $small.children().first().attr("lights");
            $small.children().eq(lights_idx).addClass("xn_mc_prodv_8_curr").siblings().removeClass("xn_mc_prodv_8_curr");
        }

        //Touch事件绑定：
        $bigLi.wipetouch({
            preventDefault:false,
            tapToClick: false,		//滑动时禁止点击事件
            wipeLeft:function(){
                nextImg();
            },
            wipeRight:function(){
                prevImg();
            }
        });

        $smallLi.wipetouch({
            preventDefault:false,
            tapToClick: false,		//滑动时禁止点击事件
            wipeLeft:function(){
                nextImg_small();
            },
            wipeRight:function(){
                prevImg_small();
            }
        });
    }

});
/*end_xn_mc_prodv_8_wrap*/

/*xn_mc_prodv_22_wrap*/
$(function(){
    if($("#xn_mc_prodv_22_wrap").length > 0){
        var oTopBox=$("#xn_mc_prodv_22_tnbox");
        var oTopUl=$("#xn_mc_prodv_22_tul");
        var oTopLi=oTopUl.children("li");
        var oLeftBtn=$("#xn_mc_prodv_22_leftBtn");
        var oRightBtn=$("#xn_mc_prodv_22_rightBtn");
        var speed=500;

        oTopLi.each(function(){
            $(this).attr("yousb",$(this).index());
        });

        oTopUl.prepend(oTopUl.children().last());

        oTopBox.css("left",oLeftBtn.outerWidth(true));
        oTopUl.width(oTopBox.outerWidth(true)*oTopLi.length).css("left",-oTopBox.outerWidth(true));
        oTopLi.width(oTopBox.outerWidth(true)).css({'margin':0,'padding':0});

        $(window).resize(function(){
            oTopBox.css("left",oLeftBtn.outerWidth(true));
            oTopUl.width(oTopBox.outerWidth(true)*oTopLi.length).css("left",-oTopBox.outerWidth(true));
            oTopLi.width(oTopBox.outerWidth(true)).css({'margin':0,'padding':0});
        });

        oLeftBtn.click(function(){
            moveLeft();
        });

        oRightBtn.click(function(){
            moveRight();
        });

        var dragDistance = 100 ;
        var oRoll_Box=HammerOne(oTopUl);//图片
        oRoll_Box.on('dragend',function(ev){
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            moveLeft();
                        }
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            moveRight();
                        }
                    }
                    break
                default:
            }
        });

        function moveLeft(){
            oTopUl.stop().animate({left:"-"+2*oTopBox.outerWidth(true) +"px"},speed,function(){
                oTopUl.append(oTopUl.children().first());
                oTopUl.css("left",-oTopBox.outerWidth(true));
            });
        }
        function moveRight(){
            oTopUl.css('left',-2*oTopBox.outerWidth(true));
            oTopUl.prepend(oTopUl.children().last());
            oTopUl.stop().animate({"left":-oTopBox.outerWidth(true)},speed,function(){

            });
        }
    }
});
/*end_xn_mc_prodv_22_wrap*/


/*xn_mc_pro_8_wrap*/
$(function(){
    if($("#xn_mc_pro_8_wrap").length > 0){
        var $wrap = $("#xn_mc_pro_8_wrap");
        var $main = $("#xn_mc_pro_8_main");
        var $left = $("#xn_mc_pro_8_left");
        var $right = $("#xn_mc_pro_8_right");
        var $ul = $("#xn_mc_pro_8_ul");
        var $page = $("#xn_mc_pro_8_pageIndex");
        var $curr_page = $("#xn_mc_pro_8_currPage");
        var $total_page = $("#xn_mc_pro_8_totalPages");
        var $li = $ul.children("li");

        var speed =300;

        $li.css("width",$main.outerWidth(true));
        $ul.css("width",$li.length * $li.outerWidth(true));
        //$page.css("left",($main.outerWidth(true) - $page.outerWidth(true) ) / 2 + "px");

        $li.each(function(){
            $(this).attr("lights",$(this).index());
        });

        $total_page.text($li.length);
        //左右切换：
        function nextImg(){
            $ul.stop().animate({left:"-"+$li.outerWidth(true) +"px"},speed,function(){
                $ul.append($ul.children().first());
                $ul.css("left",0);
                $curr_page.text(parseInt($ul.children().first().attr("lights")) + 1);
            });
        }

        function prevImg(){
            $ul.css('left',-$li.outerWidth(true));
            $ul.prepend($ul.children().last());
            $ul.stop().animate({"left":0},speed);
            $curr_page.text(parseInt($ul.children().first().attr("lights") )+ 1 );
        }

        $left.click(function(){
            nextImg();
        });
        $right.click(function(){
            prevImg();
        });

        var _scrollTop = 100;
        $(window).scroll(function(){
            _scrollTop = $(window).scrollTop();
        });
        //Touch事件绑定：
        $li.wipetouch({
            tapToClick: false,		//滑动时禁止点击事件
            wipeLeft:function(){
                nextImg();
            },
            wipeRight:function(){
                prevImg();
            },
            wipeUp:function(){
                _scrollTop += 200;
                $("body").animate({"scrollTop":_scrollTop},500);
            },
            wipeDown:function(){
                _scrollTop -= 200;
                $("body").animate({"scrollTop":_scrollTop},500);
            }
        });
    }
});
/*end_xn_mc_pro_8_wrap*/

/*xn_mc_news_5_wrap*/
$(function(){
    if($("#xn_mc_news_5_wrap").length > 0){
        var $leftUl = $(".xn_mc_news_5_leftUl");
        var $leftLi =  $leftUl.children("li");
        var $rightUl = $(".xn_mc_news_5_rightUl");
        var $rightLi = $rightUl.children("li");
        var speed = 50;
        var $currClass = "xn_mc_news_5_curr";

        $leftLi.first().show();
        $rightLi.first().addClass($currClass).siblings().removeClass($currClass);

        $rightLi.click(function(){
            var _this= $(this);
            _this.addClass($currClass).siblings().removeClass($currClass);
            $leftLi.eq(_this.index()).show(speed).siblings().hide(speed);
        });

    }
});
/*end_xn_mc_news_5_wrap*/

/*xn_mba_1_wrap*/
$(function(){
    if($("#xn_mba_1_wrap").length > 0){
        var $wrap = $("#xn_mba_1_wrap");
        var $main = $(".xn_mba_1_main");
        var $ul = $(".xn_mba_1_ul");
        var $li = $ul.children("li");
        var $lights = $(".xn_mba_1_lights");
        var speed =300;
        var $curr_class = "xn_mba_1_lightsCurr";
        var isAutoPlay = true;
        var timeInterval = 3000;

        $li.css("width",parseInt($main.outerWidth(true)));
        $ul.css("width",$li.length * $li.outerWidth(true));

        $li.each(function(){
            $lights.append("<span></span>");
            $(this).attr("lights",$(this).index());
        });
        var idx;
        var size = $li.size();
        //点击焦点图切换：
        $lights.children().first().addClass($curr_class);
        $lights.children("span").click(function(){
            var index = $(this).index();
            idx = parseInt($ul.children().first().attr("lights"));
            var num = index-idx;
            num = num>0?num:num+size;
            for(var i = 0;i < num ;i++){
                $ul.append($ul.children().first());
            }
            $ul.stop().animate({"left":0},speed);
            idx = $ul.children().first().attr("lights");
            $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);

            //$ul.animate({"left":-index*$li.outerWidth(true)},speed);
            //$(this).addClass($curr_class).siblings().removeClass($curr_class);
        });

        //左右切换：
        function nextImg(){
            $ul.stop().animate({left:"-"+$li.outerWidth(true) +"px"},speed,function(){
                $ul.append($ul.children().first());
                $ul.css("left",0);
                idx = $ul.children().first().attr("lights");
                $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
                return idx;
            });
        }

        function prevImg(){
            $ul.css('left',-$li.outerWidth(true));
            $ul.prepend($ul.children().last());
            $ul.stop().animate({"left":0},speed);

            idx = $ul.children().first().attr("lights");
            $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
        }

        if(isAutoPlay == true){
            var auto = setInterval(nextImg,timeInterval);
            $ul.mouseover(function(){
                clearInterval(auto);
            });
            $ul.mouseleave(function(){
                auto = setInterval(nextImg,timeInterval);
            });
        }

        var dragDistance = 80 ;
        var dragY = 20;
        var oTop_HammerOne=HammerOne($wrap);

        oTop_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < -dragDistance && ev.gesture.deltaY < dragY ){
                        nextImg();
                    }else if (ev.gesture.deltaX > dragDistance && ev.gesture.deltaY < dragY) {
                        prevImg();
                    };
                    break;
            }
        });
    }
});
/*end_xn_mba_1_wrap*/

/*xn_mc_index_9_wrap*/
$(function(){
    /*首页推荐新闻上下滚动*/
    if($("#xn_mc_index_9_wrap").length > 0){
        var $wrap = $("#xn_mc_index_9_wrap");
        var $main = $("#xn_mc_index_9_main");
        var $ul = $("#xn_mc_index_9_ul");
        var $li = $ul.children();
        var colum = 1;
        var speed = 1000;			//滚动速度
        var intervalTime = 3000;  	//间隔时间

        $main.css("height",$li.outerHeight(true)*colum);

        function scrollTop(){
            $ul.stop().animate({top:"-"+$li.outerHeight(true) +"px"},speed,function(){
                $ul.append($ul.children().first());
                $ul.css("top",0);
            });
        }
        var autoPlay = setInterval(scrollTop,intervalTime);

        $wrap.hover(function(){
            clearInterval(autoPlay);
        },function(){
            autoPlay = setInterval(scrollTop,intervalTime);
        });

    }
});
/*end_xn_mc_index_9_wrap*/

/*xn_mc_casev_3_wrap*/
/*2015-05-07改滑动事件*/
$(function(){
    if($("#xn_mc_casev_3_wrap").length > 0){
        var $wrap = $("#xn_mc_casev_3_wrap");
        var $main = $("#xn_mc_casev_3_main");
        var $ul = $("#xn_mc_casev_3_ul");
        var $li = $ul.children("li");
        var $lights = $("#xn_mc_casev_3_lights");
        var speed =300;
        var $curr_class = "xn_mc_casev_3_lightsCurr";

        $li.css("width",$main.outerWidth(true));
        $ul.css("width",$li.length * $li.outerWidth(true));

        $li.each(function(){
            $lights.append("<span></span>");
            $(this).attr("lights",$(this).index());
        });
        var idx;
        var size = $li.size();
        //点击焦点图切换：
        $lights.children().first().addClass($curr_class);
        $lights.children("span").click(function(){
            var index = $(this).index();
            idx = parseInt($ul.children().first().attr("lights"));
            var num = index-idx;
            num = num>0?num:num+size;
            for(var i = 0;i < num ;i++){
                $ul.append($ul.children().first());
            }
            $ul.stop().animate({"left":0},speed);
            idx = $ul.children().first().attr("lights");
            $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);

            //$ul.animate({"left":-index*$li.outerWidth(true)},speed);
            //$(this).addClass($curr_class).siblings().removeClass($curr_class);
        });

        //左右切换：
        function nextImg(){
            $ul.stop().animate({left:"-"+$li.outerWidth(true) +"px"},speed,function(){
                $ul.append($ul.children().first());
                $ul.css("left",0);
                idx = $ul.children().first().attr("lights");
                $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
                return idx;
            });
        }

        function prevImg(){
            $ul.css('left',-$li.outerWidth(true));
            $ul.prepend($ul.children().last());
            $ul.stop().animate({"left":0},speed);

            idx = $ul.children().first().attr("lights");
            $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
        }

        //Touch事件绑定：
        // $li.wipetouch({
        // 	tapToClick: false,		//滑动时禁止点击事件
        // 	wipeLeft:function(){
        // 		nextImg();
        // 	},
        // 	wipeRight:function(){
        // 		prevImg();
        // 	}
        // });

        var dragDistance = 100 ;
        var oRoll_Box=HammerOne($ul);//图片
        oRoll_Box.on('dragend',function(ev){
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }
                    }
                    break
                default:
            }
        });
    }
});
/*end_xn_mc_casev_3_wrap*/

/*xn_mc_products_11_wrap*/
$(function(){
    if($("#xn_mc_products_11_wrap").length > 0){
        $(".xn_mc_products_11_img img").removeAttr("height").removeAttr("width");
    }
});
/*end_xn_mc_products_11_wrap*/

/*xn_mc_newsv_4_wrap*/
$(function(){
    if($("#xn_mc_newsv_4_wrap").length > 0){
        var $wrap = $("#xn_mc_newsv_4_relativeWrap");
        var $main = $("#xn_mc_newsv_4_rMain");
        var $left = $("#xn_mc_newsv_4_left");
        var $right = $("#xn_mc_newsv_4_right");
        var $ul = $("#xn_mc_newsv_4_rUl");
        var $page = $("#xn_mc_newsv_4_pageIndex");
        var $curr_page = $("#xn_mc_newsv_4_currPage");
        var $total_page = $("#xn_mc_newsv_4_totalPages");
        var $li = $ul.children("li");
        var isAutoPlay = true;//是否自动播放
        var timeInterval = 3000;

        var speed =300;

        $li.css("width",$main.outerWidth(true));
        $ul.css("width",$li.length * $li.outerWidth(true));
        $page.css("left",($main.outerWidth(true) - $page.outerWidth(true) ) / 2 + "px");

        if($li.length < 0){
            $left.hide();
            $right.hide();
        }

        $li.each(function(){
            $(this).attr("lights",$(this).index());
        });

        $total_page.text($li.length);
        //左右切换：
        function nextImg(){
            $ul.stop().animate({left:"-"+$li.outerWidth(true) +"px"},speed,function(){
                $ul.append($ul.children().first());
                $ul.css("left",0);
                $curr_page.text(parseInt($ul.children().first().attr("lights")) + 1);
            });
        }

        function prevImg(){
            $ul.css('left',-$li.outerWidth(true));
            $ul.prepend($ul.children().last());
            $ul.stop().animate({"left":0},speed);
            $curr_page.text(parseInt($ul.children().first().attr("lights") )+ 1 );
        }

        $left.click(function(){
            nextImg();
        });
        $right.click(function(){
            prevImg();
        });

        if(isAutoPlay == true) var auto = setInterval(nextImg,timeInterval);
        //Touch事件绑定：
        $li.wipetouch({
            tapToClick: false,      //滑动时禁止点击事件
            wipeLeft:function(){
                nextImg();
            },
            wipeRight:function(){
                prevImg();
            }
        });
    }
});
/*end_xn_mc_newsv_4_wrap*/


/*xn_mc_news_7_wrap*/
$(function(){
    if($("#xn_mc_news_7_wrap").length > 0){
        var $head = $(".xn_mc_news_7_dHead");
        var $bottom = $(".xn_mc_news_7_dBottom");

        var speed = 300;
        var currClass = "xn_mc_news_7_curr";

        $head.on("click",function(){
            var _this = $(this);
            var $cWrap = $(".xn_mc_news_7_dCWrap");
            if(_this.parent().parent().siblings().find($cWrap).is(":visible") == true){
                _this.parent().parent().siblings().find($cWrap).slideUp(speed);
            }
            if(_this.next().is(":visible") == true){
                _this.removeClass(currClass).next().slideUp(speed);
            }else{
                _this.addClass(currClass).next().slideDown(speed);
            }

        });

        $bottom.on("click",function(){
            var _this = $(this);
            _this.parent().slideUp(speed);
        });
    }
});
/*end_xn_mc_news_7_wrap*/


/*xn_mc_pro_12_wrap*/
$(function(){
    if($("#xn_mc_pro_12_wrap").length > 0){
        var $main = $(".xn_mc_pro_12_main");
        var $col = $(".xn_mc_pro_12_col");
        var speed  = 300;

        var $main_left,
            $main_top,
            $main_right,
            $main_bottom;

        $col.click(function(event){
            event.stopPropagation();
            $main.fadeIn(speed);

            $main_left = $main.offset().left;
            $main_top  = $main.offset().top;
            $main_right = $main.outerWidth(true) + $main_left;
            $main_bottom = $main.outerHeight(true) + $main_top;
        });

        $(document).click(function(event){
            var X = event.pageX;
            var Y = event.pageY;
            if(X < $main_left || X > $main_right || Y < $main_top || Y > $main_bottom){
                $main.fadeOut(speed);
            }

        });
    }
});
/*end_xn_mc_pro_12_wrap*/


/*xn_mc_pro_11_wrap*/
$(function(){
    if($("#xn_mc_pro_11_wrap").length > 0){
        var $tUl = $("#xn_mc_pro_11_tUl");
        var $tLi = $tUl.children("li");
        var $cUl = $("#xn_mc_pro_11_cUl");
        var $cLi = $cUl.children("li");
        var $cWrap = $("#xn_mc_pro_11_cWrap");
        var $cMain = $(".xn_mc_pro_11_cMain");
        var currClass = "xn_mc_pro_11_tCurr";
        var speed = 500;

        $tLi.first().addClass(currClass);
        $cLi.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
        });

        $cLi.css("width",$cWrap.outerWidth(true));
        $cUl.css("width",$cLi.outerWidth(true) * $cLi.length).css("position","relative");

        var idx = 1;
        var size = $cLi.size();
        //点击类别切换：
        $tLi.first().addClass(currClass);
        $("#xn_mc_pro_11_cImg img").load(function(){
            $cUl.css("height",$cLi.eq(0).outerHeight(true));
        });

        $tLi.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true) * _this.index()},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
        });

        //左右切换：
        function nextDiv(){
            if(idx < $cLi.length){
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*idx},speed);
                $tLi.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                idx++;
            }else{
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1) - 100 +"px"},speed/$cLi.length);
                $cUl.animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1)},speed/$cLi.length);
            }
        }

        function prevDiv(){
            if(idx > 1){
                idx--;
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*(idx-1)});
                $tLi.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
            }else{

                $cUl.stop().animate({"left":100+"px"},speed/$cLi.length);
                $cUl.animate({"left":0},speed/$cLi.length);
            }
        }
        var _scrollTop = 200;
        $(window).scroll(function(){
            _scrollTop = $(window).scrollTop();
        });

        $cMain.wipetouch({
            preventDefault:true,
            tapToClick: false,		//滑动时禁止点击事件
            wipeLeft:function(){
                nextDiv();
            },
            wipeRight:function(){
                prevDiv();
            },
            wipeUp:function(res){
                _scrollTop += 200;
                $("html,body").animate({"scrollTop":_scrollTop},speed);
            },
            wipeDown:function(){
                _scrollTop -= 200;
                $("html,body").animate({"scrollTop":_scrollTop},speed);
            }
        });

    }
});
/*end_xn_mc_pro_11_wrap*/

/*xn_mc_index_10_wrap*/
$(function(){
    if($("#xn_mc_index_10_wrap").length > 0){
        var $wrap = $("#xn_mc_index_10_wrap");
        var $inner = $("#xn_mc_index_10_inner");
        var $ul = $inner.children("section");

        var $tUl = $(".xn_mc_index_10_hgroup");
        var $tLi = $tUl.children("h3");

        $ul.css("width",$wrap.outerWidth(true));
        $inner.css("width",$ul.length * $ul.outerWidth(true));

        var currClass = "xn_mc_index_10_curr";
        var speed = 500;

        var idx = 1;
        var size = $ul.size();
        //点击类别切换：
        $tLi.first().addClass(currClass);

        $tLi.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            $inner.stop().animate({"left":"-"+$ul.outerWidth(true) * _this.index()},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
        });

        //左右切换：
        function nextDiv(){
            if(idx < $ul.length){
                $inner.stop().animate({"left":"-"+$ul.outerWidth(true)*idx},speed);
                $tLi.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                idx++;
            }else{
                $inner.stop().animate({"left":"-"+$ul.outerWidth(true)*($ul.length-1) - 100 +"px"},speed/$ul.length);
                $inner.animate({"left":"-"+$ul.outerWidth(true)*($ul.length-1)},speed/$ul.length);
            }
        }

        function prevDiv(){
            if(idx > 1){
                idx--;
                $inner.stop().animate({"left":"-"+$ul.outerWidth(true)*(idx-1)});
                $tLi.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
            }else{

                $inner.stop().animate({"left":100+"px"},speed/$ul.length);
                $inner.animate({"left":0},speed/$ul.length);
            }
        }

        $inner.wipetouch({
            preventDefault:false,
            tapToClick:true,
            wipeLeft:function(){
                nextDiv();
            },
            wipeRight:function(){
                prevDiv();
            }
        });
    }
});
/*end_xn_mc_index_10_wrap*/

/*xn_mc_newsv_8_wrap*/
$(function(){
    if($("#xn_mc_newsv_8_wrap").length > 0){
        var $small = $(".xn_mc_newsv_8_smallSize");
        var $big = $(".xn_mc_newsv_8_bigSize");

        var fontSize = parseInt(($("html").css("font-size")).split("px"))/19.2;
        $small.click(function(){
            if(fontSize>0.625){
                fontSize-=0.125;
                $("html").css("font-size",fontSize*100+"%");
            }
        });

        $big.click(function(){
            if(fontSize < 1.125){
                fontSize+=0.125;
                $("html").css("font-size",fontSize*100+"%");
            }
        });

    }
});
/*end_xn_mc_newsv_8_wrap*/

/*xn_mc_newsv_9_wrap*/
$(function(){
    if($("#xn_mc_newsv_9_wrap").length > 0){
        var $main = $(".xn_mc_newsv_9_main");
        var $col = $(".xn_mc_newsv_9_head");
        var speed  = 300;

        var $main_left,
            $main_top,
            $main_right,
            $main_bottom;

        $col.click(function(event){
            event.stopPropagation();
            if($(this).next().find($main).is(":visible") == true){
                $main.fadeOut(speed);
            }else{
                $main.fadeIn(speed);
                $main_left = $main.offset().left;
                $main_top  = $main.offset().top;
                $main_right = $main.outerWidth(true) + $main_left;
                $main_bottom = $main.outerHeight(true) + $main_top;
            }
        });

        $(document).click(function(event){
            var X = event.pageX;
            var Y = event.pageY;
            if(X < $main_left || X > $main_right || Y < $main_top || Y > $main_bottom){
                $main.fadeOut(speed);
            }

        });
    }
});
/*end_xn_mc_newsv_9_wrap*/

/*xn_mc_1_wrap*/
$(function(){
    if($("#xn_mc_1_wrap").length > 0){
        var $wrap = $("#xn_mc_1_wrap");
        var $up = $("#xn_mc_1_up");
        var $down = $("#xn_mc_1_down");
        var speed = 300;
        var timeInterval = 3000;//停止滚动之后间隔3秒隐藏按钮
        var _scrollTop = 300;//大于400时显示按钮

        $(window).scroll(function(){
            clearTimeout(_fadeOut);
            if($(window).scrollTop() >= _scrollTop){
                $wrap.fadeIn(speed);
            }else{
                $wrap.fadeOut(speed);
            }
            _fadeOut = setTimeout(function(){
                $wrap.fadeOut(speed);
            },timeInterval);
        });


        $up.click(function(){
            $("html,body").animate({"scrollTop":0},speed);
        });

        $down.click(function(){
            $("html,body").animate({"scrollTop":$(window).scrollTop() + $("html,body").outerHeight(true)},speed);
        });

        var _fadeOut = setTimeout(function(){
            $wrap.fadeOut(speed);
        },timeInterval);

    }
});
/*end_xn_mc_1_wrap*/

/*xn_mf_3_wrap*/
$(function(){
    if($("#xn_mf_3_wrap").length > 0){
        var $menu = $("#xn_mf_3_menu");
        var $nav = $("#xn_mf_3_main");
        var speed = 300;
        $menu.click(function(e){
            e.stopPropagation();
            if($nav.is(":visible") == true){
                $nav.fadeOut(speed);
            }else{
                $nav.fadeIn(speed);
            }
        });
        var $main_left,
            $main_top,
            $main_right,
            $main_bottom;

        $(document).click(function(event){
            if($nav.is(":visible") == true){
                $main_left = $nav.offset().left;
                $main_top  = $nav.offset().top;
                $main_right = $nav.outerWidth(true) + $main_left;
                $main_bottom = $nav.outerHeight(true) + $main_top;
            }

            var _pageX = event.pageX;
            var _pageY = event.pageY;

            if(_pageX < $main_left || _pageX > $main_right || _pageY < $main_top || _pageY > $main_bottom){
                $nav.fadeOut(speed);
            }
        });
    }
});
/*end_xn_mf_3_wrap*/

/*xn_mc_newsv_13_wrap*/
$(function(){
    if($("#xn_mc_newsv_13_wrap").length > 0){
        $(this).find("img").removeAttr("width")
            .removeAttr("height")
            .removeAttr("border")
            .addClass("xn_mc_newsv_13_img")
            .next("span").remove();
    }
});
/*end_xn_mc_newsv_13_wrap*/

/*xn_mc_casev_8_wrap*/
$(function(){
    if($("#xn_mc_casev_8_wrap").length > 0){
        $(this).find("img").removeAttr("width")
            .removeAttr("height")
            .removeAttr("border")
            .addClass("xn_mc_casev_8_img")
            .next("span").remove();
    }
});
/*end_xn_mc_casev_8_wrap*/

/*xn_mc_casev_13_wrap*/
$(function(){
    if ($("#xn_mc_casev_13_wrap").length>0) {
        var oWrapDiv=$("#xn_mc_casev_13_wrap");
        var oLeftBtn=oWrapDiv.find(".xn_mc_casev_13_lbtn");
        var oRightBtn=oWrapDiv.find(".xn_mc_casev_13_rbtn");
        var oRollBox=$("#xn_mc_casev_13_rollbox");
        var oRollBox_li=oRollBox.children("li");
        var iRollBox_li_length=oRollBox_li.length;
        var iRollBox_li_width;
        var oMain_box=$("#xn_mc_casev_13_box");
        var oFoucs=$("#xn_mc_casev_13_focus");
        var oCurr="xn_mc_casev_13_curr";
        var oTopNum=$("#xn_mc_casev_13_inum");
        var oTopChange=$("#xn_mc_casev_13_ichange");
        var speed=500;
        var iNumber;

        oRollBox_li.width(oMain_box.outerWidth());
        iRollBox_li_width=oRollBox_li.width();
        oRollBox.width(iRollBox_li_length*iRollBox_li_width);

        oRollBox_li.each(function(){
            $(this).attr("index",$(this).index());
            oFoucs.append("<span>"+($(this).index()+1)+"</span>")
        });

        oFoucs.children().eq(0).addClass(oCurr);
        oTopNum.html(iRollBox_li_length);

        oLeftBtn.click(function(){
            oMoveRight();
        });

        oRightBtn.click(function(){
            oMoveLeft();
        });

        oFoucs.children().click(function(){
            var _this=$(this).index();
            oTopChange.html(_this+1);

            $(this).addClass(oCurr).siblings().removeClass(oCurr);

            iNumber=oRollBox.children().first().attr("index");

            var iDiffer=_this-iNumber;//相差

            if(iDiffer>0){
                oRollBox.stop().animate({left:"-"+Math.abs(_this-iNumber)*iRollBox_li_width+"px"},speed,function(){
                    for(var i=0; i<Math.abs(_this-iNumber); i++){
                        oRollBox.append(oRollBox.children().first());
                        oRollBox.css("left",0);
                    }
                });
            }else{
                oRollBox.css('left',-Math.abs(_this-iNumber)*iRollBox_li_width);
                for(var i=0; i<Math.abs(_this-iNumber); i++){
                    oRollBox.prepend(oRollBox.children().last());
                }
                oRollBox.stop().animate({"left":0},speed);
            }
        });

        var dragDistance = 100 ;
        var oRoll_Box=HammerOne(oRollBox);//图片
        oRoll_Box.on('dragend',function(ev){
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            oMoveRight();
                        }
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            oMoveLeft();
                        }
                    }
                    break
                default:
            }

        });

        function oMoveRight(){
            oRollBox.stop().animate({left:"-"+iRollBox_li_width+"px"},speed,function(){
                oRollBox.append(oRollBox.children().first());
                oRollBox.css("left",0);
                oChange();
            });
        }

        function oMoveLeft(){
            oRollBox.css('left',-iRollBox_li_width);
            oRollBox.prepend(oRollBox.children().last());
            oRollBox.stop().animate({"left":0},speed,function(){
                oChange();
            });

        }

        function oChange(){
            iNumber=oRollBox.children().first().attr("index");
            oTopChange.html(parseInt(iNumber)+1);
            oFoucs.children().eq(iNumber).addClass(oCurr).siblings().removeClass(oCurr);
        }
    };
});
/*end_xn_mc_casev_13_wrap*/




/*xn_mn_2_wrap*/
// $(function(){
// 	$("#ea_h").after("<div id='xn_mn_2_outWrap' class='xn_mn_2_outWrap'></div>");
// 	$("#xn_mn_2_outWrap").append($("#xn_mn_2_outWrap").nextAll());

// 	var $outWrap = $("#xn_mn_2_outWrap");
// 	var $wrap = $("#xn_mn_2_wrap");
// 	var $eaH  = $("#ea_h");
// 	var $eaH_width = $eaH.outerWidth(true);
// 	var speed = 600;

// 	$outWrap.prepend('<div class="xn_mn_2_menu" id="xn_mn_2_menu">导航</div>');
// 	var $menu = $("#xn_mn_2_menu");
// 	$outWidth = $outWrap.outerWidth(true);
// 	var $menuLeft = parseInt($menu.css("left")+"".split("px")[0]);
// 	var $menuTop = $menu.css("top");

// 	$eaH.css("width","0px").css("left","-" + $eaH_width).show();
// 	$outWrap.css("width","100%");

// 	$menu.click(function(){
// 		var _this = $(this);

// 		if($eaH.outerWidth(true) == $eaH_width){
// 			$("#content").removeAttr("style");
// 			_this.animate({"left":$menuLeft+"px"},speed);
// 			$eaH.animate({"left":"-" + $eaH_width,"width":"0px"},speed);
// 			$outWrap.animate({"width":"100%"},speed);
// 		}else{
// 			$("#content").css("width",$(window).width());
// 			_this.animate({"left":parseInt($menuLeft+$eaH_width)},speed);
// 			$eaH.animate({"width":$eaH_width,"left":"0px"},speed);
// 			$outWrap.animate({"width":$outWidth},speed);
// 		}
// 	});


// 	$eaH.wipetouch({
// 		preventDefault:true,
// 		tapToClick:false,
// 		wipeLeft:function(){
// 			$menu.animate({"left":$menuLeft+"px"},speed);
// 			$eaH.animate({"left":"-" + $eaH_width,"width":"0px"},speed);
// 			$outWrap.animate({"width":"100%"},speed);
// 		}
// 	});

// });
/*end_xn_mn_2_wrap*/

/*xn_mc_index_12_wrap*/
$(function(){
    if($("#xn_mc_index_12_wrap").length > 0){
        var $main = $("#xn_mc_index_12_main");
        var $ul = $("#xn_mc_index_12_ul");
        var $li = $ul.children("li");

        var $left = $("#xn_mc_index_12_left");
        var $right = $("#xn_mc_index_12_right");

        var $page = $("#xn_mc_index_12_pageIndex");
        var $curr_page = $("#xn_mc_index_12_currPage");
        var $total_page = $("#xn_mc_index_12_totalPages");

        var $lights = $("#xn_mc_index_12_lights");
        var $curr_class = "xn_mc_index_12_lighsCurr";

        var speed = 300;
        var cols = 2; 						//一行显示三个
        var isShowArrow = true;				//是否显示左右箭头
        var isShowPageSize = false; 		//是否显示页数
        var isShowLights = false;  			//是否显示焦点图
        var isAutoPlay = false;				//是否自动播放
        var isMultiple = false;				//是否多帧滚动
        var timeInterval = 5000;			//间隔播放时间


        $li.css("width",($main.outerWidth(true)/cols)+"px");
        $ul.css("width",$li.length*$li.outerWidth(true));

        $page.css("left",($main.outerWidth(true) - $page.outerWidth(true) ) / 2 + "px");

        $li.each(function(){
            $lights.append("<span></span>");
            $(this).attr("lights",$(this).index());
        });

        if($li.length%cols != 0){
            $li.last().remove();
        }

        var idx = $ul.children().first().attr("lights");
        var size = $li.size();
        //点击焦点图切换：
        $lights.children().first().addClass($curr_class);

        if(isShowLights == true){
            $lights.children("span").click(function(){
                var index = $(this).index();
                idx = parseInt($ul.children().first().attr("lights"));
                var num = index-idx;
                num = num>0?num:num+size;
                for(var i = 0;i < num ;i++){
                    $ul.append($ul.children().first());
                }
                $ul.stop().animate({"left":0},speed);
                idx = $ul.children().first().attr("lights");
                $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
                if(isShowPageSize == true){
                    $curr_page.text(parseInt(idx)+1);
                }

            });
        }else{
            $lights.hide();
        }

        if(isShowPageSize == true){
            if(isMultiple == true){
                $total_page.text(parseInt($li.length/cols));
            }else{
                $total_page.text($li.length);
            }

        }else{
            $page.hide();
        }
        function nextImg(){
            $ul.stop().animate({left:"-"+$li.outerWidth(true)*cols +"px"},speed,function(){
                if(isMultiple == true){
                    //循环
                    for(var i=0;i<cols;i++){
                        $ul.append($ul.children().first());
                    }
                }else{
                    $ul.append($ul.children().first());
                }
                $ul.css("left",0);
                if(isShowPageSize == true){
                    if(isMultiple == true){
                        $curr_page.text(parseInt($ul.children().first().attr("lights") )/cols+1 );
                    }else{
                        $curr_page.text(parseInt($ul.children().first().attr("lights") )+ 1 );
                    }
                }

                idx = $ul.children().first().attr("lights");
                $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
                return idx;
            });
        }

        function prevImg(){
            $ul.css('left',-$li.outerWidth(true)*cols);
            if(isMultiple == true){
                for(var i=0;i<cols;i++){
                    $ul.prepend($ul.children().last());
                }
            }else{
                $ul.prepend($ul.children().last());
            }
            $ul.stop().animate({"left":0},speed);

            if(isShowPageSize == true){
                if(isMultiple == true){
                    $curr_page.text(parseInt($ul.children().first().attr("lights") )/cols+1 );
                }else{
                    $curr_page.text(parseInt($ul.children().first().attr("lights") )+ 1 );
                }

            }

            idx = $ul.children().first().attr("lights");
            $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
        }

        if(isShowArrow == true){
            $left.click(function(){
                nextImg();
            });

            $right.click(function(){
                prevImg();
            });
        }else{
            $left.hide();
            $right.hide();
        }

        if(isAutoPlay == true){
            var auto = setInterval(nextImg,timeInterval);
            $main.hover(function(){
                clearInterval(auto);
            },function(){
                auto = setInterval(nextImg,timeInterval);
            });
        }

        var _scrollTop = 200;
        $(window).scroll(function(){
            _scrollTop = $(window).scrollTop();
        });

        $main.wipetouch({
            preventDefault:false,
            tapToClick:false,
            wipeLeft:function(){
                nextImg();
            },
            wipeRight:function(){
                prevImg();
            },
            wipeUp:function(){
                if(_scrollTop > 0){
                    _scrollTop += 200;
                    $("html,body").animate({"scrollTop":_scrollTop},speed);
                }

            },
            wipeDown:function(){
                if(_scrollTop < $(window).scrollTop() + $("html,body").outerHeight(true) - 200){
                    _scrollTop -= 200;
                    $("html,body").animate({"scrollTop":_scrollTop},speed);
                }
            }
        });

    }
});
/*end_xn_mc_index_12_wrap*/


/*xn_mc_about_5_wrap*/
$(function(){
    if($("#xn_mc_about_5_wrap").length > 0){
        var $tUl = $("#xn_mc_about_5_tUl");
        var $tLi = $tUl.children("li");
        var $cUl = $("#xn_mc_about_5_cUl");
        var $cLi = $cUl.children("li");
        var $cWrap = $("#xn_mc_about_5_cWrap");
        var currClass = "xn_mc_about_5_tCurr";
        var speed = 500;

        $tLi.first().addClass(currClass);
        $cLi.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
        });

        $cLi.css("width",$cWrap.outerWidth(true));
        $cUl.css("width",$cLi.outerWidth(true) * $cLi.length).css("position","relative");

        var idx = 1;
        var size = $cLi.size();
        //点击焦点图切换：
        $tLi.first().addClass(currClass);
        $(".xn_mc_about_5_cImg img").load(function(){
            $cUl.css("height",$cLi.eq(0).outerHeight(true));
        });
        $tLi.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true) * _this.index(),"height":$cLi.eq(_this.index()).outerHeight(true)},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
        });

        //左右切换：
        function nextImg(){
            if(idx < $cLi.length){
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*idx,"height":$cLi.eq(idx).outerHeight(true)},speed);
                $tLi.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                idx++;
            }else{
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1) - 100 +"px"},speed/$cLi.length);
                $cUl.animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1)},speed/$cLi.length);
            }
        }

        function prevImg(){
            if(idx > 1){
                idx--;
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*(idx-1),"height":$cLi.eq(idx-1).outerHeight(true)});
                $tLi.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
            }else{

                $cUl.stop().animate({"left":100+"px"},speed/$cLi.length);
                $cUl.animate({"left":0},speed/$cLi.length);
            }
        }
        var _scrollTop = 200;
        $(window).scroll(function(){
            _scrollTop = $(window).scrollTop();
        });


        var dragDistance = 100 ;
        var oRoll_Box=HammerOne($cWrap);//内容
        oRoll_Box.on('dragend',function(ev){
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }
                    }
                    break
                default:
            }
        });
    }
});
/*end_xn_mc_about_5_wrap*/



/*xn_mc_index_13_wrap*/
$(function(){
    if($("#xn_mc_index_13_wrap").length > 0){
        var $main = $("#xn_mc_index_13_main");
        var $ul = $("#xn_mc_index_13_ul");
        var $li = $ul.children("li");

        var $left = $("#xn_mc_index_13_left");
        var $right = $("#xn_mc_index_13_right");

        var $page = $("#xn_mc_index_13_pageIndex");
        var $curr_page = $("#xn_mc_index_13_currPage");
        var $total_page = $("#xn_mc_index_13_totalPages");

        var $lights = $("#xn_mc_index_13_lights");
        var $curr_class = "xn_mc_index_13_lighsCurr";

        var speed = 300;
        var cols = 2; 						//显示个数
        var isShowArrow = true;				//是否显示左右箭头
        var isShowPageSize = false; 		//是否显示页数
        var isShowLights = false;  			//是否显示焦点图
        var isAutoPlay = false;				//是否自动播放
        var timeInterval = 5000;			//间隔播放时间


        $li.css("width",($main.outerWidth(true)/cols)+"px");
        $ul.css("width",$li.length*$li.outerWidth(true));

        $page.css("left",($main.outerWidth(true) - $page.outerWidth(true) ) / 2 + "px");

        $li.each(function(){
            $lights.append("<span></span>");
            $(this).attr("lights",$(this).index());
        });


        var idx = $ul.children().first().attr("lights");
        var size = $li.size();
        //点击焦点图切换：
        $lights.children().first().addClass($curr_class);

        if(isShowLights == true){
            $lights.children("span").click(function(){
                var index = $(this).index();
                idx = parseInt($ul.children().first().attr("lights"));
                var num = index-idx;
                num = num>0?num:num+size;
                for(var i = 0;i < num ;i++){
                    $ul.append($ul.children().first());
                }
                $ul.stop().animate({"left":0},speed);
                idx = $ul.children().first().attr("lights");
                $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
                if(isShowPageSize == true){
                    $curr_page.text(parseInt(idx)+1);
                }

            });
        }else{
            $lights.hide();
        }

        if(isShowPageSize == true){
            $total_page.text($li.length);
        }else{
            $page.hide();
        }
        function nextImg(){
            $ul.stop().animate({left:"-"+$li.outerWidth(true) +"px"},speed,function(){
                $ul.append($ul.children().first());
                $ul.css("left",0);
                if(isShowPageSize == true){
                    $curr_page.text(parseInt($ul.children().first().attr("lights")) + 1);
                }

                idx = $ul.children().first().attr("lights");
                $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
                return idx;
            });
        }

        function prevImg(){
            $ul.css('left',-$li.outerWidth(true));
            $ul.prepend($ul.children().last());
            $ul.stop().animate({"left":0},speed);

            if(isShowPageSize == true){
                $curr_page.text(parseInt($ul.children().first().attr("lights") )+ 1 );
            }

            idx = $ul.children().first().attr("lights");
            $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
        }

        if(isShowArrow == true){
            $left.click(function(){
                nextImg();
            });

            $right.click(function(){
                prevImg();
            });
        }else{
            $left.hide();
            $right.hide();
        }

        if(isAutoPlay == true){
            var auto = setInterval(nextImg,timeInterval);
            $main.hover(function(){
                clearInterval(auto);
            },function(){
                auto = setInterval(nextImg,timeInterval);
            });
        }

        var _scrollTop = 200;
        $(window).scroll(function(){
            _scrollTop = $(window).scrollTop();
        });

        $main.wipetouch({
            preventDefault:false,
            tapToClick:false,
            wipeLeft:function(){
                nextImg();
            },
            wipeRight:function(){
                prevImg();
            },
            wipeUp:function(){
                if(_scrollTop > 0){
                    _scrollTop += 200;
                    $("html,body").animate({"scrollTop":_scrollTop},speed);
                }

            },
            wipeDown:function(){
                if(_scrollTop < $(window).scrollTop() + $("html,body").outerHeight(true) - 200){
                    _scrollTop -= 200;
                    $("html,body").animate({"scrollTop":_scrollTop},speed);
                }
            }
        });

    }
});
/*end_xn_mc_index_13_wrap*/

/*xn_mc_pro_13_wrap*/
$(function(){
    if($("#xn_mc_pro_13_wrap").length > 0){
        var $main = $("#xn_mc_pro_13_main");
        var $ul = $(".xn_mc_pro_13_ul");
        var $li = $ul.children("li");

        var $left = $(".xn_mc_pro_13_left");
        var $right = $(".xn_mc_pro_13_right");

        var speed = 300;
        var cols = 3;                       //一行显示三个
        var isShowArrow = true;             //是否显示左右箭头

        $li.css("width",($main.outerWidth(true)/cols)+"px");
        $ul.each(function(){
            $(this).css("width",$(this).children().length*$(this).children().outerWidth(true));
            if($(this).outerWidth(true) <= $(this).parent().outerWidth(true)){
                $(this).nextAll().hide();
            }
        });

        $(".xn_mc_pro_13_tLi").each(function(){
            $(this).find("ul").attr("id","xn_mc_pro_13_ul_"+$(this).index());
        });

        function nextImg(id){
            $ul = $("#xn_mc_pro_13_ul_"+id);
            $ul.stop().animate({left:"-"+$li.outerWidth(true) +"px"},speed,function(){
                $ul.append($ul.children().first());
                $ul.css("left",0);
            });
        }

        function prevImg(id){
            $ul = $("#xn_mc_pro_13_ul_"+id);
            $ul.css('left',-$li.outerWidth(true));
            $ul.prepend($ul.children().last());
            $ul.stop().animate({"left":0},speed);
        }

        if(isShowArrow == true){
            $left.click(function(){
                var _this = $(this);
                nextImg(_this.parent().index());
            });

            $right.click(function(){
                var _this = $(this);
                prevImg(_this.parent().index());
            });
        }else{
            $left.hide();
            $right.hide();
        }

        var _scrollTop = 200;
        $(window).scroll(function(){
            _scrollTop = $(window).scrollTop();
        });

        $(".xn_mc_pro_13_tLi").each(function(){
            var _this = $(this);
            $("#xn_mc_pro_13_ul_"+_this.index()).wipetouch({
                preventDefault:false,
                tapToClick:false,
                wipeLeft:function(){
                    nextImg(_this.index());
                },
                wipeRight:function(){
                    prevImg(_this.index());
                }
            });
        });

        $main.wipetouch({
            preventDefault:false,
            tapToClick:false,
            wipeUp:function(){
                if(_scrollTop > 0){
                    _scrollTop += 200;
                    $("html,body").animate({"scrollTop":_scrollTop},speed);
                }

            },
            wipeDown:function(){
                if(_scrollTop < $(window).scrollTop() + $("html,body").outerHeight(true) - 200){
                    _scrollTop -= 200;
                    $("html,body").animate({"scrollTop":_scrollTop},speed);
                }
            }
        });

    }
});
/*end_xn_mc_pro_13_wrap*/


/*xn_mc_pro_14_wrap*/
$(function(){
    if($("#xn_mc_pro_14_wrap").length > 0){
        var $tab = $(".xn_mc_pro_14_name");
        var $cWrap = $(".xn_mc_pro_14_cWrap");
        var speed = 300;
        $tab.click(function(){
            if($(this).parent().parent().next($cWrap).is(":visible") == true){
                $(this).parent().parent().next($cWrap).slideUp(speed);
            }else{
                $(this).parent().parent().next($cWrap).slideDown(speed);
            }

            if($(this).parent().parent().parent().siblings().find($cWrap).is(":visible") == true){
                $(this).parent().parent().parent().siblings().find($cWrap).slideUp(speed);
            }

        });
    }
});
/*end_xn_mc_pro_14_wrap*/

/*xn_mc_case_8_wrap*/
$(function(){
    if($("#xn_mc_case_8_wrap").length > 0){
        var $tUl = $("#xn_mc_case_8_ul");
        var $tLi = $tUl.children("li");
        var $cUl = $("#xn_mc_case_8_subUl");
        var $cLi = $cUl.children("li");
        var $cWrap = $("#xn_mc_case_8_sub");
        var currClass = "xn_mc_case_8_tCurr";
        var speed = 500;

        $tLi.first().addClass(currClass);
        $cLi.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
        });

        $cLi.css("width",$cWrap.outerWidth(true));
        $cUl.css("width",$cLi.outerWidth(true) * $cLi.length).css("position","relative");

        var idx = 1;
        var size = $cLi.size();
        //点击焦点图切换：
        $tLi.first().addClass(currClass);

        $tLi.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true) * _this.index()},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
        });

        //左右切换：
        function nextImg(){
            if(idx < $cLi.length){
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*idx},speed);
                $tLi.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                idx++;
            }else{
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1) - 100 +"px"},speed/$cLi.length);
                $cUl.animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1)},speed/$cLi.length);
            }
        }

        function prevImg(){
            if(idx > 1){
                idx--;
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*(idx-1)});
                $tLi.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
            }else{

                $cUl.stop().animate({"left":100+"px"},speed/$cLi.length);
                $cUl.animate({"left":0},speed/$cLi.length);
            }
        }

        $cWrap.wipetouch({
            preventDefault:false,
            tapToClick: false,		//滑动时禁止点击事件
            wipeLeft:function(){
                nextImg();
            },
            wipeRight:function(){
                prevImg();
            }
        });

    }
});
/*end_xn_mc_case_8_wrap*/



/*xn_mc_about_6_wrap*/
$(function(){
    if($("#xn_mc_about_6_wrap").length > 0){
        var $tUl = $("#xn_mc_about_6_ul");
        var $tLi = $tUl.children("li");
        var $cUl = $("#xn_mc_about_6_subUl");
        var $cLi = $cUl.children("li");
        var $cWrap = $("#xn_mc_about_6_sub");
        var currClass = "xn_mc_about_6_tCurr";
        var speed = 500;

        $tLi.first().addClass(currClass);
        $cLi.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
        });

        $cLi.css("width",$cWrap.outerWidth(true));
        $cUl.css("width",$cLi.outerWidth(true) * $cLi.length).css("position","relative");

        var idx = 1;
        var size = $cLi.size();
        //点击焦点图切换：
        $tLi.first().addClass(currClass);
        $(".xn_mc_about_6_subImg img").load(function(){
            $cUl.css("height",$cLi.eq(0).outerHeight(true));
        });


        $tLi.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true) * _this.index(),"height":$cLi.eq(_this.index()).outerHeight(true)},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
        });

        //左右切换：
        function nextImg(){
            if(idx < $cLi.length){
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*idx,"height":$cLi.eq(idx).outerHeight(true)},speed);
                $tLi.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                idx++;
            }else{
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1) - 100 +"px"},speed/$cLi.length);
                $cUl.animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1)},speed/$cLi.length);
            }
        }

        function prevImg(){
            if(idx > 1){
                idx--;
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*(idx-1),"height":$cLi.eq(idx-1).outerHeight(true)});
                $tLi.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
            }else{

                $cUl.stop().animate({"left":100+"px"},speed/$cLi.length);
                $cUl.animate({"left":0},speed/$cLi.length);
            }
        }

        $cWrap.wipetouch({
            preventDefault:false,
            tapToClick: false,      //滑动时禁止点击事件
            wipeLeft:function(){
                nextImg();
            },
            wipeRight:function(){
                prevImg();
            }
        });

    }
});
/*end_xn_mc_about_6_wrap*/


/*xn_mc_case_9_wrap*/
/*2015-05-28改滑动事件*/
$(function(){
    if($("#xn_mc_case_9_wrap").length > 0){
        var $tUl = $("#xn_mc_case_9_tUl");
        var $tLi = $tUl.children("li");
        var $cUl = $("#xn_mc_case_9_cUl");
        var $cLi = $cUl.children("li");
        var $cWrap = $("#xn_mc_case_9_cWrap");
        var currClass = "xn_mc_case_9_tCurr";
        var speed = 500;

        $tLi.first().addClass(currClass);
        $cLi.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
        });

        $cLi.css("width",$cWrap.outerWidth(true));
        $cUl.css("width",$cLi.outerWidth(true) * $cLi.length).css("position","relative");

        var idx = 1;
        var size = $cLi.size();
        //点击焦点图切换：
        $tLi.first().addClass(currClass);

        $tLi.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true) * _this.index()},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
        });

        //左右切换：
        function nextImg(){
            if(idx < $cLi.length){
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*idx},speed);
                $tLi.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                idx++;
            }else{
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1) - 100 +"px"},speed/$cLi.length);
                $cUl.animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1)},speed/$cLi.length);
            }
        }

        function prevImg(){
            if(idx > 1){
                idx--;
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*(idx-1)});
                $tLi.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
            }else{

                $cUl.stop().animate({"left":100+"px"},speed/$cLi.length);
                $cUl.animate({"left":0},speed/$cLi.length);
            }
        }
        //滑动事件
        var oHammerOne=HammerOne($cWrap);
        var dragDistance = 100 ;
        oHammerOne.on('dragend',function(ev){
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }
                    }
                    break
                default:
            }
        });


    }
});
/*end_xn_mc_case_9_wrap*/

/*xn_mc_case_16_wrap*/
$(function(){
    case_16_wrap();
});

function case_16_wrap(){
    var oMdivwrap=$("#xn_mc_case_16_wrap");
    var oMdivwrap_len=oMdivwrap.height();
    var oMdiv=$("#xn_mc_case_16_main");
    var oSul=$("#xn_mc_case_16_sul");
    var oHframe=$("#xn_mc_case_16_hframe");
    var oHhead=$(".xn_mc_case_16_head");
    var oClose=$(".xn_mc_case_16_close");
    var oHf_con=$(".xn_mc_case_16_hf_con");
    var speed=300;
    var oZdy_bank=" #xn_mc_casev_8_wrap,#xn_mc_casev_7_wrap,#n_foot";

    oMdiv.width(100*2+"%");

    oHf_con.height($(window).height()-oHhead.height());
    $(".xn_mc_case_16_hf_scroll").height($(window).height()-oHhead.height());

    $(".xn_mc_case_16_sbox").width(100/2+"%");
    $(".xn_mc_case_16_hbox").width(100/2+"%");

    oHframe.css({"left":oHframe.outerWidth(true),top:0});

    function getSize(){

        oSul.children("li").click(function(){
            oHframe.height($(window).height());
            $(".xn_mc_case_16_htit").html($(this).find(".xn_mc_case_16_scname").html());
            //弹出相应详情页
            $('.xn_mc_case_16_hf_scroll').load($(this).find("a").attr("href")+oZdy_bank,function(){
                $("#xn_mc_case_16_loading").hide();
            });
            oHframe.stop().animate({left:"-"+0+"px"},speed,function(){
                oMdivwrap.height(0);
                $("#ea_b #n_foot").hide();
            });
        });

        oClose.click(function(){
            oMdivwrap.css("height","auto");
            oHframe.stop().animate({left:oHframe.outerWidth(true)},speed,function(){
                $("#demo_body").removeAttr("style");
                $("#xn_mc_case_16_loading").show();
                $("#n_foot").show();
            });
            $(".xn_mc_case_16_hf_scroll").children().remove();
        });
    }
    getSize();

    var iMbtnSpeed=800;
    $("#xn_mc_case_16_moreBtn").click(function(){
        $.ajax({ url: "/m/npro_list_more.aspx", success: function(){
            iMbtnSpeed=iMbtnSpeed+100;
            setTimeout(function(){
                getSize();
            },iMbtnSpeed);
        }});
    });
}
/*end_xn_mc_case_16_wrap*/


/*xn_mc_case_17_wrap*/
$(function(){
    if($("#xn_mc_case_17_wrap").length > 0){
        var oTop_ul = $("#xn_mc_case_17_tul");
        var oTop_li = oTop_ul.children("li");
        var oTop_li_length=oTop_li.length;
        var oTop_li_width=oTop_li.outerWidth(true);
        var oCon_ulWrap = $("#xn_mc_case_17_sub");
        var oCon_ul = $("#xn_mc_case_17_subUl");
        var oCon_li = oCon_ul.find(".xn_mc_case_17_subLi");
        var currClass = "xn_mc_case_17_tCurr";
        var speed = 500;
        var iNumber=3;     //控制每屏显示的栏目个数

        $(".xn_index_tit").each(function(){
            $(this).attr("index",$(this).index());
        });

        $(".xn_mc_case_17_smore").click(function(){
            var ab=$(this);
            setTimeout(function(){
                ab.parents(".xn_mc_case_17_subLi").find(".xn_index_tit").attr("index",1);
            },1000);
        });

        oTop_ul.width(100*oTop_li_length+"%");
        oTop_li.width(100/oTop_li_length/iNumber+"%");

        oTop_li.first().addClass(currClass);
        oCon_li.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
        });

        oCon_li.css("width",$(window).width());
        oCon_ul.css("width",$(window).width() * oCon_li.length).css("position","relative");

        var idx = 1;

        //点击焦点图切换：
        oTop_li.first().addClass(currClass);

        oTop_li.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true) * _this.index()},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
        });

        //左右切换：
        function nextImg(){
            if(idx < oCon_li.length){
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*idx},speed);
                oTop_li.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                if (idx>=iNumber) {
                    oTop_li.eq(idx-iNumber).addClass("xn_mc_case_17_control");//往前走添加class名
                };
                idx++;
            }else{
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*(oCon_li.length-1) - 100 +"px"},speed/oCon_li.length);
                oCon_ul.animate({"left":"-"+oCon_li.outerWidth(true)*(oCon_li.length-1)},speed/oCon_li.length);
            }
        }

        function prevImg(){
            if(idx > 1){
                var iMoveLeftNum=idx-2;
                oTop_li.eq(iMoveLeftNum).removeClass("xn_mc_case_17_control");//往回走移除添加的class名
                idx--;
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*(idx-1)},speed);
                oTop_li.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
            }else{
                oCon_ul.stop().animate({"left":100+"px"},speed/oCon_li.length);
                oCon_ul.animate({"left":0},speed/oCon_li.length);
            }
        }

        var dragDistance = 5 ;
        var dragTime = 200;
        var oTop_HammerOne=HammerOne(oTop_ul);//类别
        var oCon_HammerOne=HammerOne(oCon_ulWrap);//类别说明-图片
        oTop_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }else{}
                    }
                    break;
                default:
            }
        });
        oCon_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }else{}
                    }
                    break;
                default:
            }
        });
    }
});
/*end_xn_mc_case_17_wrap*/

/*xn_mc_case_19_wrap*/
$(function(){
    if($("#xn_mc_case_19_wrap").length > 0){
        var $tUl = $("#xn_mc_case_19_tUl");
        var $tLi = $tUl.children("li");
        var $cUl = $("#xn_mc_case_19_cUl");
        var $cLi = $cUl.children("li");
        var $cWrap = $("#xn_mc_case_19_cWrap");
        var currClass = "xn_mc_case_19_tCurr";
        var speed = 500;

        $tLi.first().addClass(currClass);
        $cLi.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
        });

        $cLi.css("width",$cWrap.outerWidth(true));
        $cUl.css("width",$cLi.outerWidth(true) * $cLi.length).css("position","relative");

        var idx = 1;
        var size = $cLi.size();
        //点击焦点图切换：
        $tLi.first().addClass(currClass);

        $tLi.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true) * _this.index()},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
        });

        //左右切换：
        function nextImg(){
            if(idx < $cLi.length){
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*idx},speed);
                $tLi.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                idx++;
            }else{
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1) - 100 +"px"},speed/$cLi.length);
                $cUl.animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1)},speed/$cLi.length);
            }
        }

        function prevImg(){
            if(idx > 1){
                idx--;
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*(idx-1)});
                $tLi.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
            }else{

                $cUl.stop().animate({"left":100+"px"},speed/$cLi.length);
                $cUl.animate({"left":0},speed/$cLi.length);
            }
        }

        $cWrap.wipetouch({
            preventDefault:false,
            tapToClick: false,      //滑动时禁止点击事件
            wipeLeft:function(){
                nextImg();
            },
            wipeRight:function(){
                prevImg();
            }
        });

    }
});
/*end_xn_mc_case_19_wrap*/

/*xn_mc_sv_3_wrap*/
$(function(){
    if($("#xn_mc_sv_3_wrap").length > 0){
        var $tUl = $("#xn_mc_sv_3_tUl");
        var $tLi = $tUl.children("li");
        var $cUl = $("#xn_mc_sv_3_cUl");
        var $cLi = $cUl.children("li");
        var $cWrap = $("#xn_mc_sv_3_cWrap");
        var currClass = "xn_mc_sv_3_tCurr";
        var speed = 500;

        $tLi.first().addClass(currClass);
        $cLi.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
        });

        $cLi.css("width",$cWrap.outerWidth(true));
        $cUl.css("width",$cLi.outerWidth(true) * $cLi.length).css("position","relative");

        var idx = 1;
        var size = $cLi.size();
        //点击焦点图切换：
        $tLi.first().addClass(currClass);

        $tLi.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true) * _this.index()},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
        });

        //左右切换：
        function nextImg(){
            if(idx < $cLi.length){
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*idx},speed);
                $tLi.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                idx++;
            }else{
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1) - 100 +"px"},speed/$cLi.length);
                $cUl.animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1)},speed/$cLi.length);
            }
        }

        function prevImg(){
            if(idx > 1){
                idx--;
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*(idx-1)});
                $tLi.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
            }else{

                $cUl.stop().animate({"left":100+"px"},speed/$cLi.length);
                $cUl.animate({"left":0},speed/$cLi.length);
            }
        }

        $cWrap.wipetouch({
            preventDefault:false,
            tapToClick: false,      //滑动时禁止点击事件
            wipeLeft:function(){
                nextImg();
            },
            wipeRight:function(){
                prevImg();
            }
        });

    }
});
/*end_xn_mc_sv_3_wrap*/




/*xn_mc_about_7_wrap*/
$(function(){
    if($("#xn_mc_about_7_wrap").length > 0){
        var $tUl = $("#xn_mc_about_7_tUl");
        var $tLi = $tUl.children("li");
        var $cUl = $("#xn_mc_about_7_cUl");
        var $cLi = $cUl.children("li");
        var $cWrap = $("#xn_mc_about_7_cWrap");
        var currClass = "xn_mc_about_7_tCurr";
        var speed = 500;

        $tLi.first().addClass(currClass);
        $cLi.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
        });

        $cLi.css("width",$cWrap.width());
        $cUl.css("width",$cLi.outerWidth(true) * $cLi.length).css("position","relative");

        var idx = 1;
        var size = $cLi.size();
        //点击焦点图切换：
        $tLi.first().addClass(currClass);

        $(".xn_mc_about_7_cImg img").load(function(){
            $cUl.css("height",$cLi.eq(0).outerHeight(true));
        });


        $tLi.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true) * _this.index(),"height":$cLi.eq(_this.index()).outerHeight(true)},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
        });

        //左右切换：

        function nextImg(){
            if(idx < $cLi.length){
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*idx,"height":$cLi.eq(idx).outerHeight(true)},speed);
                $tLi.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                idx++;
            }else{
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1) - 100 +"px"},speed/$cLi.length);
                $cUl.animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1)},speed/$cLi.length);
            }
        }

        function prevImg(){
            if(idx > 1){
                idx--;
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*(idx-1),"height":$cLi.eq(idx-1).outerHeight(true)});
                $tLi.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
            }else{

                $cUl.stop().animate({"left":100+"px"},speed/$cLi.length);
                $cUl.animate({"left":0},speed/$cLi.length);
            }
        }

        $cWrap.wipetouch({
            preventDefault:false,
            tapToClick: false,      //滑动时禁止点击事件
            wipeLeft:function(){
                nextImg();
            },
            wipeRight:function(){
                prevImg();
            }
        });

    }
});
/*end_xn_mc_about_7_wrap*/

/*xn_mc_3_wrap*/
$(function(){
    if($("#xn_mc_3_wrap").length > 0){
        var $aside = $("#xn_mc_3_wrap");
        var $aside_width = $aside.outerWidth(true);
        var speed = 300;
        $aside.css("left",-$aside_width);
        var $main_left,$main_top,$main_right,$main_bottom;

        $("#xn_mc_3_menu").click(function(event){
            $("#ea_h").css("position","relative");
            if(parseInt($aside.css("left").split("px")) < 0){
                event.stopPropagation();
                $aside.animate({left:0},speed);
            }else{
                $aside.animate({left:-$aside_width},speed);
            }

        });

        $aside.click(function(event){
            event.stopPropagation();
        });

        function wipeToLeft(){
            $aside.animate({left:-$aside_width},speed);
        }

        $(document).click(function(){
            if(parseInt($aside.css("left").split("px")) >= 0){
                $main_left = $aside.offset().left;
                $main_top  = $aside.offset().top;
                $main_right = $aside.outerWidth(true) + $main_left;
                $main_bottom = $aside.outerHeight(true) + $main_top;
            }
            var X = event.pageX;
            var Y = event.pageY;
            if(X < $main_left || X > $main_right || Y < $main_top || Y > $main_bottom){
                $aside.animate({left:-$aside_width},speed);
            }

        });

        $aside.wipetouch({
            preventDefault:false,
            tapToClick: true,		//滑动时禁止点击事件
            wipeLeft:function(){
                wipeToLeft();
            },
        });
    }
});
/*end_xn_mc_3_wrap*/

/*xn_mc_news_8_wrap*/
$(function(){
    if($("#xn_mc_news_8_wrap").length > 0){
        var $tUl = $("#xn_mc_news_8_tUl");
        var $tLi = $tUl.children("li");
        var $cUl = $("#xn_mc_news_8_cUl");
        var $cLi = $cUl.children("li");
        var $cWrap = $("#xn_mc_news_8_cWrap");
        var currClass = "xn_mc_news_8_tCurr";
        var speed = 500;
        var $ul = $(".xn_mc_news_8_cMain");
        var $out = $(".xn_mc_news_8_main");
        var $li = $ul.children("li");

        var $up = $("#xn_mc_news_8_wipeUp");
        var $down = $("#xn_mc_news_8_wipeDown");

        $tLi.first().addClass(currClass);
        $cLi.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
            _this.find("ul").attr("id","xn_mc_news_8_cMain"+_this.index()+"");
        });

        $cLi.css("width",$cWrap.outerWidth(true));
        $cUl.css("width",$cLi.outerWidth(true) * $cLi.length).css("position","relative");

        var idx = 1;
        var size = $cLi.size();
        //点击类别切换：
        $tLi.first().addClass(currClass);

        $tLi.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true) * _this.index()},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
        });

        //左右切换：
        function nextDiv(){
            if(idx < $cLi.length){
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*idx},speed);
                $tLi.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                idx++;
            }else{
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1) - 100 +"px"},speed/$cLi.length);
                $cUl.animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1)},speed/$cLi.length);
            }
        }

        function prevDiv(){
            if(idx > 1){
                idx--;
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*(idx-1)});
                $tLi.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
            }else{

                $cUl.stop().animate({"left":100+"px"},speed/$cLi.length);
                $cUl.animate({"left":0},speed/$cLi.length);
            }
        }

        $li.wipetouch({
            preventDefault:false,
            tapToClick: true,		//滑动时禁止点击事件
            wipeLeft:function(){
                nextDiv();
            },
            wipeRight:function(){
                prevDiv();
            }
        });



        var $class1 = "xn_mc_news_8_cstyle1";
        var $class2 = "xn_mc_news_8_cstyle2";
        var $class3 = "xn_mc_news_8_cstyle3";

        var $class1_bg = "xn_mc_news_8_cstyle1_bg";
        var $class2_bg = "xn_mc_news_8_cstyle2_bg";
        var $class3_bg = "xn_mc_news_8_cstyle3_bg";

        var speed = 400;
        var num = 3;
        var indx = 1;
        var $li_len = $li.length;

        for(var idxt = 0; idxt < $cLi.length; idxt++){
            $("#xn_mc_news_8_cMain"+idxt+" li").each(function(){
                var _this = $(this);
                var _index = _this.index();
                _this.attr("index",_index);
                var _thisClass = _this.attr("class");
                _this.css("left",($ul.outerWidth(true) - _this.outerWidth(true) )/2 +"px");

                if(_thisClass == $class1){
                    _this.next().removeClass().addClass($class2).next().removeClass().addClass($class3).next().removeClass().addClass($class2).next().removeClass().addClass($class1);
                }
            });
        }

        $(".xn_mc_news_8_cMain").css("width",$(".xn_mc_news_8_cMain").parent().outerWidth(true));
        $(".xn_mc_news_8_cMain").css("height",$(".xn_mc_news_8_cMain").children().eq(0).outerHeight(true)+$(".xn_mc_news_8_cMain").children().eq(1).outerHeight(true)
            +$(".xn_mc_news_8_cMain").children().eq(2).outerHeight(true)
            +$(".xn_mc_news_8_cMain").children().eq(3).outerHeight(true)
            +$(".xn_mc_news_8_cMain").children().eq(4).outerHeight(true));

        //上下滑动：
        var wipeIndex = 1;
        function wipeUp(){
            var currIndex;
            $tUl.children("li").each(function(){
                if($(this).hasClass(currClass)){
                    currIndex = $(this).index();
                }
            });
            var moveUl = $("#xn_mc_news_8_cMain" + currIndex);

            if((wipeIndex < (moveUl.children().length - num)) && (moveUl.children.length < (num+2))){
                moveUl.children().eq(indx+4).animate({width:moveUl.children().eq(indx-1).width()+"px",height:moveUl.children().eq(indx-1).height()+"px",left:moveUl.children().eq(indx-1).css("left")},speed,function(){
                    moveUl.children().eq(indx + 4).addClass($class2_bg).removeClass($class3_bg).removeClass($class1_bg);//6
                });
                moveUl.children().eq(indx+3).animate({width:moveUl.children().eq(indx).width()+"px",height:moveUl.children().eq(indx).height()+"px",left:moveUl.children().eq(indx).css("left")},speed,function(){
                    moveUl.children().eq(indx + 3).addClass($class1_bg).removeClass($class2_bg).removeClass($class2_bg);//5
                });
                moveUl.children().eq(indx+2).animate({width:moveUl.children().eq(indx+1).width()+"px",height:moveUl.children().eq(indx+1).height()+"px",left:moveUl.children().eq(indx+1).css("left")},speed,function(){
                    moveUl.children().eq(indx + 2).addClass($class3_bg).removeClass($class2_bg).removeClass($class1_bg);//4
                });
                moveUl.children().eq(indx+1).animate({width:moveUl.children().eq(indx).width()+"px",height:moveUl.children().eq(indx).height()+"px",left:moveUl.children().eq(indx).css("left")},speed,function(){
                    moveUl.children().eq(indx + 1).addClass($class2_bg).removeClass($class3_bg).removeClass($class1_bg);//3
                });
                moveUl.children().eq(indx).animate({width:moveUl.children().eq(indx-1).width()+"px",height:moveUl.children().eq(indx-1).height()+"px",left:moveUl.children().eq(indx-1).css("left")},speed,function(){
                    moveUl.children().eq(indx).addClass($class1_bg).removeClass($class3_bg).removeClass($class2_bg);//2
                });
                moveUl.children().eq(indx-1).animate({width:moveUl.children().eq(indx-1).width()+"px",height:moveUl.children().eq(indx-1).height()+"px",left:moveUl.children().eq(indx-1).css("left")},speed,function(){
                    moveUl.children().eq(indx -1).addClass($class1_bg).removeClass($class2_bg).removeClass($class3_bg);//1
                });

                moveUl.stop().animate({top:"-"+moveUl.children().outerHeight(true) +"px"},speed,function(){
                    moveUl.append(moveUl.children().first());
                    moveUl.css("top",0);
                    moveUl.children().eq(4).nextAll().removeAttr("style");
                });
                wipeIndex++;
                moveUl.children().each(function(){
                    $(this).find(".xn_mc_news_8_viewMore").remove();
                });
                moveUl.children().eq(3).find(".xn_mc_news_8_newsBrief").append("<div class='xn_mc_news_8_viewMore'>view</div>");
            }

        }
        function wipeDown(){
            var currIndex;
            $tUl.children("li").each(function(){
                if($(this).hasClass(currClass)){
                    currIndex = $(this).index();
                }
            });
            var moveUl = $("#xn_mc_news_8_cMain" + currIndex);

            if((wipeIndex > -1) && (moveUl.children().length > (num+2) )){
                moveUl.children().last().animate({width:moveUl.children().first().width(),height:moveUl.children().first().height(),left:moveUl.children().first().css("left")},speed,function(){
                    $(this).removeClass($class2_bg).removeClass($class3_bg).addClass($class1_bg);
                });
                moveUl.children().eq(indx - 1).animate({width:moveUl.children().eq(indx).width(),height:moveUl.children().eq(indx).height(),left:moveUl.children().eq(indx).css("left")},speed,function(){
                    $(this).removeClass($class1_bg).removeClass($class3_bg).addClass($class2_bg);
                });
                moveUl.children().eq(indx).animate({width:moveUl.children().eq(indx+1).width(),height:moveUl.children().eq(indx+1).height(),left:moveUl.children().eq(indx+1).css("left")},speed,function(){
                    $(this).removeClass($class1_bg).removeClass($class2_bg).addClass($class3_bg);
                });
                moveUl.children().eq(indx+1).animate({width:moveUl.children().eq(indx+2).width(),height:moveUl.children().eq(indx+2).height(),left:moveUl.children().eq(indx+2).css("left")},speed,function(){
                    $(this).removeClass($class1_bg).removeClass($class3_bg).addClass($class2_bg);
                });
                moveUl.children().eq(indx+2).animate({width:moveUl.children().eq(indx+3).width(),height:moveUl.children().eq(indx+3).height(),left:moveUl.children().eq(indx+3).css("left")},speed,function(){
                    $(this).removeClass($class3_bg).removeClass($class2_bg).addClass($class1_bg);
                });
                moveUl.children().eq(indx+3).animate({width:moveUl.children().eq(indx+4).width(),height:moveUl.children().eq(indx+4).height(),left:moveUl.children().eq(indx+4).css("left")},speed,function(){
                    $(this).removeClass($class1_bg).removeClass($class2_bg).addClass($class3_bg);
                });

                moveUl.css('top',-moveUl.children().outerHeight(true));
                moveUl.prepend(moveUl.children().last());
                moveUl.stop().animate({"top":0},speed);
                wipeIndex--;
                moveUl.children().each(function(){
                    $(this).find(".xn_mc_news_8_viewMore").remove();
                });
                moveUl.children().eq(2).find(".xn_mc_news_8_newsBrief").append("<div class='xn_mc_news_8_viewMore'>view</div>");
            }
        }

        //上下切换按钮：
        $up.click(function(){
            wipeUp();
        });

        $down.click(function(){
            wipeDown();
        });

        //点击弹出框：
        $(".xn_mc_news_8_newsBrief").click(function(){
            $up.hide();
            $down.hide();
            $(this).hide();

            $(this).parent().siblings().hide();
            var _this = $(this).next(".xn_mc_news_8_newsInfor");
            _this.fadeIn(speed);

            $cWrap.css("position","fixed");
            _this.css("position","absolute").css("top","0px").css("left","0px");
            _this.animate({"height":$cWrap.outerHeight(true),"width":$("html").outerWidth(true)});
            $(this).next().find(".xn_mc_news_8_newsDetails").css("height",$(window).height()*0.85);
            $(this).parent().css("position","static");
        });

        $(".xn_mc_news_8_close").click(function(){
            $cWrap.removeAttr("style");
            $up.show();
            $down.show();
            $(this).parent().parent().siblings().fadeIn(speed);
            $(this).parent().parent().css("position","relative");
            $(".xn_mc_news_8_newsBrief").fadeIn(speed);
            var _this = $(this);
            _this.parent().removeAttr("style").fadeOut(speed);
        });

        $li.children(".xn_mc_news_8_newsBrief").wipetouch({
            preventDefault:true,
            tapToClick: false,      //滑动时禁止点击事件
            wipeUp:function(){
                wipeUp();
            },
            wipeDown:function(){
                wipeDown();
            }
        });

        $(".xn_mc_news_8_cLi").each(function(){
            $(this).children("ul").children("li").eq(2).append("<div class='xn_mc_news_8_viewMore'>view</div>");
        });

    }

});
/*end_xn_mc_news_8_wrap*/

/*xn_mc_news_9_wrap*/
$(function(){
    if($("#xn_mc_news_9_wrap").length > 0){
        var oTop_ul = $("#xn_mc_news_9_ul");
        var oTop_li = oTop_ul.children("li");
        var oTop_li_length=oTop_li.length;
        var oTop_li_width=oTop_li.outerWidth(true);
        var oCon_ulWrap = $("#xn_mc_news_9_sub");
        var oCon_ul = $("#xn_mc_news_9_subUl");
        var oCon_li = oCon_ul.children("li");
        var currClass = "xn_mc_news_9_tCurr";
        var speed = 500;
        var iNumber=3;     //控制每屏显示的栏目个数

        oTop_ul.width(100*oTop_li_length+"%");
        oTop_li.width(100/oTop_li_length/iNumber+"%");

        oTop_li.first().addClass(currClass);
        oCon_li.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
        });

        oCon_li.css("width",oCon_ulWrap.outerWidth(true));
        oCon_ul.css("width",oCon_li.outerWidth(true) * oCon_li.length).css("position","relative");

        var idx = 1;

        //点击焦点图切换：
        oTop_li.first().addClass(currClass);

        oTop_li.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true) * _this.index()},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
        });

        //左右切换：
        function nextImg(){
            if(idx < oCon_li.length){
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*idx},speed);
                oTop_li.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                if (idx>=iNumber) {
                    oTop_li.eq(idx-iNumber).addClass("xn_mc_news_9_control");//往前走添加class名
                };
                idx++;
            }else{
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*(oCon_li.length-1) - 100 +"px"},speed/oCon_li.length);
                oCon_ul.animate({"left":"-"+oCon_li.outerWidth(true)*(oCon_li.length-1)},speed/oCon_li.length);
            }
        }

        function prevImg(){
            if(idx > 1){
                var iMoveLeftNum=idx-2;
                oTop_li.eq(iMoveLeftNum).removeClass("xn_mc_news_9_control");//往回走移除添加的class名
                idx--;
                oCon_ul.stop().animate({"left":"-"+oCon_li.outerWidth(true)*(idx-1)},speed);
                oTop_li.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
            }else{
                oCon_ul.stop().animate({"left":100+"px"},speed/oCon_li.length);
                oCon_ul.animate({"left":0},speed/oCon_li.length);
            }
        }

        var dragDistance = 5 ;
        var dragTime = 200;
        var oTop_HammerOne=HammerOne(oTop_ul);//类别
        var oCon_HammerOne=HammerOne(oCon_ulWrap);//类别说明-图片
        oTop_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }else{}
                    }
                    break;
                default:
            }
        });
        oCon_HammerOne.on('dragend',function(ev){
            ev.preventDefault();
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }else{}
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }else{}
                    }
                    break;
                default:
            }
        });
    }
});
/*end_xn_mc_news_9_wrap*/

/*xn_mc_news_10_wrap*/
$(function(){
    news_10_wrap();
});

function news_10_wrap(){
    var oMdivwrap=$("#xn_mc_news_10_wrap");
    var oMdivwrap_len=oMdivwrap.height();
    var oMdiv=$("#xn_mc_news_10_main");
    var oSul=$("#xn_mc_news_10_sul");
    var oHframe=$("#xn_mc_news_10_hframe");
    var oHhead=$(".xn_mc_news_10_head");
    var oClose=$(".xn_mc_news_10_close");
    var oHf_con=$(".xn_mc_news_10_hf_con");
    var speed=300;
    var oZdy_bank=" #xn_mc_newsv_13_wrap,#xn_mc_newsv_12_wrap,#n_foot";//控制加载的内容

    oMdiv.width(100*2+"%");

    oHf_con.height($(window).height()-oHhead.height());
    $(".xn_mc_news_10_hf_scroll").height($(window).height()-oHhead.height());

    $(".xn_mc_news_10_sbox").width(100/2+"%");
    $(".xn_mc_news_10_hbox").width(100/2+"%");

    oHframe.css({"left":oHframe.outerWidth(true),top:0});

    function getSize(){

        $(".xn_mc_news_10_sli").each(function(){
            $(this).attr("lights",$(this).index());
        });

        oSul.children("li").click(function(){
            oHframe.height($(window).height());
            $(".xn_mc_news_10_htit").html($(this).find(".xn_mc_news_10_scname").html());
            //弹出相应详情页
            $('.xn_mc_news_10_hf_scroll').load($(this).find("a").attr("href")+oZdy_bank,function(){
                $("#xn_mc_news_10_loading").hide();
            });
            oHframe.stop().animate({left:"-"+0+"px"},speed,function(){
                //oMdivwrap.height(0);
                $("#ea_b #n_foot").hide();
            });
        });

        oClose.click(function(){
            oMdivwrap.css("height","auto");
            oHframe.stop().animate({left:oHframe.outerWidth(true)},speed,function(){
                $("#demo_body").removeAttr("style");
                $("#xn_mc_news_10_loading").show();
                $("#n_foot").show();
            });
            $(".xn_mc_news_10_hf_scroll").children().remove();
        });
    }
    getSize();

    var iMbtnSpeed=800;
    $("#xn_mc_news_10_moreBtn").click(function(){
        $.ajax({ url: "/m/news_list_more.aspx", success: function(){
            iMbtnSpeed=iMbtnSpeed+100;
            setTimeout(function(){
                getSize();
            },iMbtnSpeed);
        }});
    });
}
/*end_xn_mc_news_10_wrap*/


/*xn_mc_about_8_wrap*/
$(function(){
    if($("#xn_mc_about_8_wrap").length > 0){
        var $tUl = $("#xn_mc_about_8_tUl");
        var $tLi = $tUl.children("li");
        var $cUl = $("#xn_mc_about_8_cUl");
        var $cLi = $cUl.children("li");
        var $cWrap = $("#xn_mc_about_8_cWrap");
        var currClass = "xn_mc_about_8_tCurr";
        var speed = 500;
        var isAccordion = true;  //其中一个类别为手风琴效果

        $tLi.first().addClass(currClass);
        $cLi.each(function(){
            var _this = $(this);
            _this.attr("index",_this.index());
        });

        $cLi.css("width",$cWrap.outerWidth(true));
        $cUl.css("width",$cLi.outerWidth(true) * $cLi.length).css("position","relative");

        var idx = 1;
        var size = $cLi.size();
        //点击焦点图切换：
        $tLi.first().addClass(currClass);
        $(".xn_mc_about_8_cImg img").load(function(){
            $cUl.css("height",$cLi.eq(0).outerHeight(true));
        });

        $tLi.click(function(){
            var _this = $(this);
            idx = _this.index()+1;
            $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true) * _this.index(),"height":$cLi.eq(_this.index()).outerHeight(true)},speed);
            _this.addClass(currClass).siblings().removeClass(currClass);
        });

        //左右切换：

        function nextImg(){
            if(idx < $cLi.length){
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*idx,"height":$cLi.eq(idx).outerHeight(true)},speed);
                $tLi.eq(idx).addClass(currClass).siblings().removeClass(currClass);
                idx++;
            }else{
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1) - 100 +"px"},speed/$cLi.length);
                $cUl.animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1)},speed/$cLi.length);
            }
        }

        function prevImg(){
            if(idx > 1){
                idx--;
                $cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*(idx-1),"height":$cLi.eq(idx-1).outerHeight(true)});
                $tLi.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
            }else{

                $cUl.stop().animate({"left":100+"px"},speed/$cLi.length);
                $cUl.animate({"left":0},speed/$cLi.length);
            }
        }


        $cWrap.wipetouch({
            preventDefault:false,
            tapToClick: true,      //滑动时禁止点击事件
            wipeLeft:function(){
                nextImg();
            },
            wipeRight:function(){
                prevImg();
            }

        });

        if(isAccordion == true){
            var _typeIndex = $("#xn_mc_about_8_type_3").index();
            var $main = $("#xn_mc_about_8_cUl li").eq(_typeIndex);

            $main.children().each(function(){
                $(this).find(".xn_mc_about_8_author").nextAll().wrapAll("<div class='xn_mc_about_8_contWrap'></div>");
                $(this).find(".xn_mc_about_8_cCont").prepend("<div class='xn_mc_about_8_view'>查看</div>");
                $(this).find(".xn_mc_about_8_contWrap").prevAll().wrapAll("<div class='xn_mc_about_8_colWrap'></div>");

            });
            $(".xn_mc_about_8_contWrap").hide();

            $(".xn_mc_about_8_colWrap").click(function(){
                $cUl.css("height","auto");
                if($(this).next().is(":visible") == true){
                    $(this).next().slideUp(speed);
                }else{
                    $(this).next().slideDown(speed);
                }

                if($(this).parent().parent().siblings().find(".xn_mc_about_8_contWrap").is(":visible") == true){
                    $(this).parent().parent().siblings().find(".xn_mc_about_8_contWrap").slideUp(speed);
                }

            });

        }

    }
});
/*end_xn_mc_about_8_wrap*/

/*xn_mc_about_9_wrap*/
$(function(){
    about_9_wrap();
});

function about_9_wrap(){
    var oMdiv=$("#xn_mc_about_9_main");
    var oSul=$("#xn_mc_about_9_sul");
    var oHul=$("#xn_mc_about_9_hul");
    var oHulChild=oHul.children("li");
    var oClose=$(".xn_mc_about_9_close");
    var speed=300;

    oMdiv.width(100*2+"%");
    $(".xn_mc_about_9_sbox").width(100/2+"%");
    $(".xn_mc_about_9_hbox").width(100/2+"%");

    oHulChild.css("min-height",$(".xn_mc_about_9_sbox").outerHeight(true));

    oSul.children("li").click(function(){
        var _this=$(this).index();
        oHulChild.eq(_this).stop().animate({left:"-"+oHulChild.outerWidth(true)+"px"},speed,function(){
            oHul.height($(this).find(".xn_mc_about_9_head").height()+$(this).find(".xn_mc_about_9_hcon").height());
        });
    });

    oClose.click(function(){
        $(this).parents(".xn_mc_about_9_cLi").stop().animate({left:0},speed,function(){
            $(this).removeAttr("style");
            oHul.height(0);
            oHulChild.css("min-height",$(".xn_mc_about_9_sbox").outerHeight(true));
        });
    });
}
/*end_xn_mc_about_9_wrap*/


/*xn_mc_index_19_wrap*/
/*2015-05-28改滑动事件*/
$(function(){
    if($("#xn_mc_index_19_wrap").length > 0){
        var $main = $("#xn_mc_index_19_main");
        var $ul = $("#xn_mc_index_19_ul");
        var $li = $ul.children("li");

        var $left = $("#xn_mc_index_19_left");
        var $right = $("#xn_mc_index_19_right");

        var $page = $("#xn_mc_index_19_pageIndex");
        var $curr_page = $("#xn_mc_index_19_currPage");
        var $total_page = $("#xn_mc_index_19_totalPages");

        var $lights = $("#xn_mc_index_19_lights");
        var $curr_class = "xn_mc_index_19_lighsCurr";

        var speed = 300;
        var cols = 1;                       //一行显示个数
        var isShowArrow = true;             //是否显示左右箭头
        var isShowPageSize = false;         //是否显示页数
        var isShowLights = true;           //是否显示焦点图
        var isAutoPlay = true;             //是否自动播放
        var isMultiple = false;             //是否多帧滚动
        var timeInterval = 5000;            //间隔播放时间


        $li.css("width",($main.outerWidth(true)/cols)+"px");
        $ul.css("width",$li.length*$li.outerWidth(true));

        $page.css("left",($main.outerWidth(true) - $page.outerWidth(true) ) / 2 + "px");

        $li.each(function(){
            $lights.append("<span></span>");
            $(this).attr("lights",$(this).index());
        });

        if($li.length%cols != 0){
            $li.last().remove();
        }

        var idx = $ul.children().first().attr("lights");
        var size = $li.size();
        //点击焦点图切换：
        $lights.children().first().addClass($curr_class);

        if(isShowLights == true){
            $lights.children("span").click(function(){
                var index = $(this).index();
                idx = parseInt($ul.children().first().attr("lights"));
                var num = index-idx;
                num = num>0?num:num+size;
                for(var i = 0;i < num ;i++){
                    $ul.append($ul.children().first());
                }
                $ul.stop().animate({"left":0},speed);
                idx = $ul.children().first().attr("lights");
                $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
                if(isShowPageSize == true){
                    $curr_page.text(parseInt(idx)+1);
                }

            });
        }else{
            $lights.hide();
        }

        if(isShowPageSize == true){
            if(isMultiple == true){
                $total_page.text(parseInt($li.length/cols));
            }else{
                $total_page.text($li.length);
            }

        }else{
            $page.hide();
        }
        function nextImg(){
            $ul.stop().animate({left:"-"+$li.outerWidth(true)*cols +"px"},speed,function(){
                if(isMultiple == true){
                    //循环
                    for(var i=0;i<cols;i++){
                        $ul.append($ul.children().first());
                    }
                }else{
                    $ul.append($ul.children().first());
                }
                $ul.css("left",0);
                if(isShowPageSize == true){
                    if(isMultiple == true){
                        $curr_page.text(parseInt($ul.children().first().attr("lights") )/cols+1 );
                    }else{
                        $curr_page.text(parseInt($ul.children().first().attr("lights") )+ 1 );
                    }
                }

                idx = $ul.children().first().attr("lights");
                $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
                return idx;
            });
        }

        function prevImg(){
            $ul.css('left',-$li.outerWidth(true)*cols);
            if(isMultiple == true){
                for(var i=0;i<cols;i++){
                    $ul.prepend($ul.children().last());
                }
            }else{
                $ul.prepend($ul.children().last());
            }
            $ul.stop().animate({"left":0},speed);

            if(isShowPageSize == true){
                if(isMultiple == true){
                    $curr_page.text(parseInt($ul.children().first().attr("lights") )/cols+1 );
                }else{
                    $curr_page.text(parseInt($ul.children().first().attr("lights") )+ 1 );
                }

            }

            idx = $ul.children().first().attr("lights");
            $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
        }

        if(isShowArrow == true){
            $left.click(function(){
                nextImg();
            });

            $right.click(function(){
                prevImg();
            });
        }else{
            $left.hide();
            $right.hide();
        }

        if(isAutoPlay == true){
            var auto = setInterval(nextImg,timeInterval);
            $main.hover(function(){
                clearInterval(auto);
            },function(){
                auto = setInterval(nextImg,timeInterval);
            });
        }

        var _scrollTop = 200;
        $(window).scroll(function(){
            _scrollTop = $(window).scrollTop();
        });

        //滑动事件
        var oHammerOne=HammerOne($main);
        var dragDistance = 100 ;
        oHammerOne.on('dragend',function(ev){
            switch(ev.type){
                case "dragend":
                    if(ev.gesture.deltaX < 0 ){
                        if(ev.gesture.deltaX < -dragDistance ){
                            nextImg();
                        }
                    }
                    if(ev.gesture.deltaX > 0){
                        if(ev.gesture.deltaX > dragDistance ){
                            prevImg();
                        }
                    }
                    break
                default:
            }
        });


    }
});
/*end_xn_mc_index_19_wrap*/

/*xn_mc_index_21_wrap*/
$(function(){
    if($("#xn_mc_index_21_wrap").length > 0){
        var $main = $(".xn_mc_index_21_subCont");
        var $ul = $(".xn_mc_index_21_subUl");
        var $li = $ul.children("li");

        var $left = $(".xn_mc_index_21_left");
        var $right = $(".xn_mc_index_21_right");

        var $page = $(".xn_mc_index_21_pageIndex");
        var $curr_page = $(".xn_mc_index_21_currPage");
        var $total_page = $(".xn_mc_index_21_totalPages");

        var $lights = $(".xn_mc_index_21_lights");
        var $curr_class = "xn_mc_index_21_lighsCurr";

        var $tUl = $("#xn_mc_index_21_tUl");


        var speed = 300;
        var cols = 1;                       //一行移动个数
        var iShow = 3;                       //一行显示个数
        var isShowArrow = true;             //是否显示左右箭头
        var isShowPageSize = true;         //是否显示页数
        var isShowLights = false;           //是否显示焦点图
        var isAutoPlay = false;             //是否自动播放
        var isMultiple = false;             //是否多帧滚动
        var timeInterval = 5000;            //间隔播放时间


        $li.css("width",($main.outerWidth(true)/iShow)+"px");
        $ul.css("width",$li.length*$li.outerWidth(true));

        $page.css("left",($main.outerWidth(true) - $page.outerWidth(true) ) / 2 + "px");


        var idx;
        var size;
        $tUl.children("li").each(function(){
            var _this = $(this).find(".xn_mc_index_21_subCont").find(".xn_mc_index_21_subMain").find(".xn_mc_index_21_subUl");
            $li = _this.children("li");
            if($li.length%cols != 0){
                $li.last().remove();
            }

            idx = $ul.children().first().attr("lights");
            size = $li.size();

            $li.each(function(){
                $li.parent().parent().children(".xn_mc_index_21_lights").append("<span></span>");
                $(this).attr("lights",$(this).index());
                $li.parent().parent().children(".xn_mc_index_21_lights").children().first().addClass($curr_class);
            });
            //点击焦点图切换：
            if(isShowLights == true){
                $li.parent().parent().children(".xn_mc_index_21_lights").children("span").click(function(){
                    var index = $(this).index();
                    idx = parseInt(_this.children().first().attr("lights"));
                    var num = index-idx;
                    num = num>0?num:num+size;
                    for(var i = 0;i < num ;i++){
                        _this.append(_this.children().first());
                    }
                    _this.stop().animate({"left":0},speed);
                    idx = _this.children().first().attr("lights");
                    $(this).parent().children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
                    if(isShowPageSize == true){
                        $(this).parent().prev().find(".xn_mc_index_21_currPage").text(parseInt(idx)+1);
                    }
                });
            }else{
                $lights.hide();
            }

        });


        var _thisUlLen;

        $tUl.children("li").each(function(){
            var _this = $(this).find(".xn_mc_index_21_subCont").find(".xn_mc_index_21_subMain").find(".xn_mc_index_21_pageIndex");
            var _thisUl = _this.parent().find("ul");
            _this.find(".xn_mc_index_21_totalPages").text(_thisUl.children().length);
        });

        function pageSize(){
            if(isShowPageSize == true){
                if(isMultiple == true){
                    $tUl.children("li").each(function(){
                        var _this = $(this).find(".xn_mc_index_21_subCont").find(".xn_mc_index_21_subMain").find(".xn_mc_index_21_pageIndex");
                        var _thisUl = _this.parent().find("ul");
                        _thisUlLen = _thisUl.children().length;
                        _this.find(".xn_mc_index_21_totalPages").text(parseInt(_thisUlLen/cols));
                    });
                }else{
                    $tUl.children("li").each(function(){
                        var _this = $(this).find(".xn_mc_index_21_subCont").find(".xn_mc_index_21_subMain").find(".xn_mc_index_21_pageIndex");
                        var _thisUl = _this.parent().find("ul");
                        _thisUlLen = _thisUl.children().length;
                        _this.find(".xn_mc_index_21_totalPages").text(parseInt(_thisUlLen));
                    });

                }

            }else{
                $page.hide();
            }
        }

        pageSize();


        function nextImg(id){
            $ul = $("#"+id);
            $ul.stop().animate({left:"-"+$li.outerWidth(true)*cols +"px"},speed,function(){
                if(isMultiple == true){
                    //循环
                    for(var i=0;i<cols;i++){
                        $ul.append($ul.children().first());
                    }
                }else{
                    $ul.append($ul.children().first());
                }
                $ul.css("left",0);
                if(isShowPageSize == true){
                    if(isMultiple == true){
                        $ul.parent().find(".xn_mc_index_21_currPage").text(parseInt($ul.children().first().attr("lights") )/cols+1 );
                    }else{
                        $ul.parent().find(".xn_mc_index_21_currPage").text(parseInt($ul.children().first().attr("lights") )+ 1 );
                    }
                }

                idx = $ul.children().first().attr("lights");
                $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
                return idx;
            });
        }

        function prevImg(id){
            $ul = $("#"+id);
            $ul.css('left',-$li.outerWidth(true)*cols);
            if(isMultiple == true){
                for(var i=0;i<cols;i++){
                    $ul.prepend($ul.children().last());
                }
            }else{
                $ul.prepend($ul.children().last());
            }
            $ul.stop().animate({"left":0},speed);

            if(isShowPageSize == true){
                if(isMultiple == true){
                    $ul.parent().find(".xn_mc_index_21_currPage").text(parseInt($ul.children().first().attr("lights") )/cols+1 );
                }else{
                    $ul.parent().find(".xn_mc_index_21_currPage").text(parseInt($ul.children().first().attr("lights") )+ 1 );
                }

            }

            idx = $ul.children().first().attr("lights");
            $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
        }

        if(isShowArrow == true){
            $left.click(function(){
                var _this = $(this);
                nextImg(_this.parent().find("ul").attr("id"));
            });

            $right.click(function(){
                var _this = $(this);
                prevImg(_this.parent().find("ul").attr("id"));
            });
        }else{
            $left.hide();
            $right.hide();
        }

        if(isAutoPlay == true){
            var auto = setInterval(nextImg,timeInterval);
            $main.hover(function(){
                clearInterval(auto);
            },function(){
                auto = setInterval(nextImg,timeInterval);
            });
        }

        $tUl.children("li").each(function(){
            var _this = $(this);
            var $thisUl = _this.find(".xn_mc_index_21_subCont").find(".xn_mc_index_21_subMain").find("ul");

            var dragDistance = 100 ;
            var oRoll_Box=HammerOne($thisUl);//图片
            oRoll_Box.on('dragend',function(ev){
                switch(ev.type){
                    case "dragend":
                        if(ev.gesture.deltaX < 0 ){
                            if(ev.gesture.deltaX < -dragDistance ){
                                nextImg($(this).attr("id"));
                            }
                        }
                        if(ev.gesture.deltaX > 0){
                            if(ev.gesture.deltaX > dragDistance ){
                                prevImg($(this).attr("id"));
                            }
                        }
                        break
                    default:
                }
            });
        });
    }
});
/*end_xn_mc_index_21_wrap*/



//以下是功能控件js：

/*xn_mc_newsv_1_wrap*/
var EIMS_C_10005_1 = {
    Scroll: null,
    Timeout: null,
    Config:{
        MultImageSrc: "/m/pro_view_tu.aspx",
        NoRulePage:"/m/lose.aspx",//无权限提示页面名称
        RulePageContentID:"content",//过滤限页面内容的ID
        RowIds:""//行ID串
    },

    Init : function () {
        EIMS_C_10005_1.Config.RowIds = "," + EIMS_C_10005_1_PIds + ",";

        var cId = QueryString("Id");
        var id = "," + cId + ",";
        var nextid, preid, str;
        var firstDiv = $q("#EIMS_C_10005_1_IndexItem")[0];

        var startIndex = EIMS_C_10005_1.Config.RowIds.indexOf(id);
        if (startIndex >= 0) {
            str = EIMS_C_10005_1.Config.RowIds.substr(startIndex + id.length);
            nextid = str.substr(0,str.indexOf(","));
        }
        firstDiv.setAttribute("nextId", nextid);

        startIndex = EIMS_C_10005_1.Config.RowIds.indexOf(id);
        if (startIndex >= 0) {
            str = EIMS_C_10005_1.Config.RowIds.substr(0,startIndex);
            preid = str.substr(str.lastIndexOf(",") + 1);
        }
        firstDiv.setAttribute("preid", preid);

        var scrollHeight = firstDiv.scrollHeight;
        var divHeight = document.body.clientHeight;
        /*- $q("header")[0].offsetHeight;*/
        EIMS_C_10005_1.Scroll = new Scroll("EIMS_C_10005_1_moveContainer", 1, document.body.clientWidth, 1, document.body.clientWidth, divHeight, false, EIMS_C_10005_1.moveBack);

        //var preid = firstDiv.getAttribute("preid");
        //var nextid = firstDiv.getAttribute("nextid");
        var moveCount = 1;

        if (!IsNullOrEmpty(preid)) {
            var newDiv = document.createElement("div");
            newDiv.className = "EIMS_C_10005_1_Item EIMS_C_10005_1_loading";
            newDiv.style["width"] = document.body.clientWidth + "px";
            newDiv.style["height"] = "auto";
            newDiv.innerHTML = "&nbsp;";
            $q("#EIMS_C_10005_1_moveContainer")[0].insertBefore(newDiv, firstDiv);

            $q("#EIMS_C_10005_1_moveContainer")[0].style[EIMS_C_10005_1.Scroll.getTransform()] = "translate(-" + document.body.clientWidth + "px, 0px) scale(1)";
            moveCount++;
        }

        if (!IsNullOrEmpty(nextid)) {
            var newDiv = document.createElement("div");
            newDiv.className = "EIMS_C_10005_1_Item EIMS_C_10005_1_loading";
            newDiv.style["width"] = document.body.clientWidth + "px";
            newDiv.style["height"] = "auto";
            newDiv.innerHTML = "&nbsp;";
            $q("#EIMS_C_10005_1_moveContainer")[0].appendChild(newDiv);
            moveCount++;
        }

        if (moveCount>1) {
            EIMS_C_10005_1.Scroll.setMoveCount(moveCount);
        }

        window.addEventListener("resize", function () {
            EIMS_C_10005_1.resize();
        });

        EIMS_C_10005_1.resize();
    },

    resize : function () {
        var EIMS_C_10005_1_Item = $q(".EIMS_C_10005_1_Item");
        for (var i = 0; i < EIMS_C_10005_1_Item.length; i++) {
            EIMS_C_10005_1_Item[i].style["width"] = document.body.clientWidth + "px";
        }
        EIMS_C_10005_1.Scroll.setMovingLength(document.body.clientWidth);
    },
    moveBack : function (i, direction) {
        clearTimeout(EIMS_C_10005_1.Timeout);

        if (parseInt(direction) == 3) { //向左移动
            var nextDiv = $q(".EIMS_C_10005_1_Item")[i];
            if (IsNullOrEmpty(nextDiv) || nextDiv.getAttribute("loaded") == "1") {
                return;
            }

            var curDiv = $q(".EIMS_C_10005_1_Item")[i - 1];
            var cId = curDiv.getAttribute("nextId");
            var url = curDiv.getAttribute("url");

            if (IsNullOrEmpty(cId)) {
                return;
            }

            url = MergeUrlParas(url, false, ["Id"], [cId]);
            var ajax = new Ajax();
            ajax.getData(url, "EIMS_C_10005_1_IndexItem", function (data, script) {
                if (IsNullOrEmpty(data)) {
                    return;
                }

                var s = document.createElement("span");
                s.innerHTML = data;

                var nextId = "";
                //取下一个ID
                var id = "," + cId + ",";
                var startIndex = EIMS_C_10005_1.Config.RowIds.indexOf(id);

                if (startIndex >= 0) {
                    var str = EIMS_C_10005_1.Config.RowIds.substr(startIndex + id.length);
                    nextId = str.substr(0,str.indexOf(","));
                }

                var reg = new RegExp("Page\s*=.*?" + EIMS_C_10005_1.Config.NoRulePage);
                if (reg.test(data)) {
                    var r = s.querySelectorAll("#" + EIMS_C_10005_1.Config.RulePageContentID)[0];
                    nextDiv.innerHTML = r.outerHTML;
                }else{
                    var r = s.querySelectorAll("#EIMS_C_10005_1_IndexItem")[0];
                    nextDiv.innerHTML = r.innerHTML;
                }

                nextDiv.className = "EIMS_C_10005_1_Item";
                nextDiv.style["height"] = "";
                nextDiv.setAttribute("loaded", "1");
                nextDiv.setAttribute("nextId", nextId);

                var iframe = nextDiv.querySelectorAll("iframe");
                if (iframe && iframe.length > 0) {
                    iframe[0].src = MergeUrlParas(EIMS_C_10005_1.Config.MultImageSrc, false, ["Id"], [cId]);
                }

                ReLoadImage(nextDiv);

                if (!IsNullOrEmpty(nextId)) {
                    var newDiv = document.createElement("div");

                    newDiv.className = "EIMS_C_10005_1_Item EIMS_C_10005_1_loading";
                    newDiv.style["width"] = document.body.clientWidth + "px";
                    newDiv.style["height"] = "auto";
                    $q("#EIMS_C_10005_1_moveContainer")[0].appendChild(newDiv);

                    EIMS_C_10005_1.Scroll.setMoveCount(EIMS_C_10005_1.Scroll.getMoveCount() + 1);
                }

            }, false);
        }

        if (parseInt(direction) == 4) { //向右移动
            if (i > 0) {
                return;
            }

            var preDiv = $q(".EIMS_C_10005_1_Item")[i];
            if (IsNullOrEmpty(preDiv) || preDiv.getAttribute("loaded") == "1") {
                return;
            }

            var curDiv = $q(".EIMS_C_10005_1_Item")[i + 1];
            var cId = curDiv.getAttribute("preid");
            var url = curDiv.getAttribute("url");

            if (IsNullOrEmpty(cId)) {
                return;
            }

            url = MergeUrlParas(url, false, ["Id"], [cId]);

            var ajax = new Ajax();
            ajax.getData(url, "EIMS_C_10005_1_IndexItem", function (data, script) {
                if (IsNullOrEmpty(data)) {
                    return;
                }

                var s = document.createElement("span");
                s.innerHTML = data;

                //取上一个ID
                var id = "," + cId + ",";
                var startIndex = EIMS_C_10005_1.Config.RowIds.indexOf(id);

                if (startIndex >= 0) {
                    var str = EIMS_C_10005_1.Config.RowIds.substr(0,startIndex);
                    preid = str.substr(str.lastIndexOf(",") + 1);
                }

                var reg = new RegExp("Page\s*=.*?" + EIMS_C_10005_1.Config.NoRulePage);
                if (reg.test(data)) {
                    var r = s.querySelectorAll("#" + EIMS_C_10005_1.Config.RulePageContentID)[0];
                    preDiv.innerHTML = r.outerHTML;
                }else{
                    var r = s.querySelectorAll("#EIMS_C_10005_1_IndexItem")[0];
                    preDiv.innerHTML = r.innerHTML;
                }

                preDiv.className = "EIMS_C_10005_1_Item";
                preDiv.style["Height"] = "";
                preDiv.setAttribute("loaded", "1");
                preDiv.setAttribute("preid", preid);

                var iframe = preDiv.querySelectorAll("iframe");
                if (iframe && iframe.length > 0) {
                    iframe[0].src = MergeUrlParas(EIMS_C_10005_1.Config.MultImageSrc, false, ["Id"], [cId]);
                }

                ReLoadImage(preDiv);

                if (IsNullOrEmpty(preid)) {
                    return;
                }

                EIMS_C_10005_1.Timeout = setTimeout(function () {
                    var newDiv = document.createElement("div");

                    newDiv.className = "EIMS_C_10005_1_Item EIMS_C_10005_1_loading";
                    newDiv.style["width"] = document.body.clientWidth + "px";
                    newDiv.style["Height"] = "auto";
                    newDiv.innerHTML = "&nbsp;";
                    $q("#EIMS_C_10005_1_moveContainer")[0].insertBefore(newDiv, preDiv);
                    EIMS_C_10005_1.Scroll.setMoveCount(EIMS_C_10005_1.Scroll.getMoveCount() + 1);

                    var tf = $q("#EIMS_C_10005_1_moveContainer")[0].style[EIMS_C_10005_1.Scroll.getTransform()];
                    var x = 0;
                    if (tf != "") {
                        var position = tf.split('(')[1].split(',');
                        x = parseInt(position[0]);
                    }

                    $q("#EIMS_C_10005_1_moveContainer")[0].style[EIMS_C_10005_1.Scroll.getTransform()] = "translate(" + (x - document.body.clientWidth) + "px, 0px) scale(1)";
                }, 800);

            }, false);
        }
    }
}
/*end_xn_mc_newsv_1_wrap*/

/*feedback*/
/*------2015-07-01修改取消留言-------*/
$(function(){
    try {
        if ($("#EIMS_C_10002_1_Main").length > 0) {
            EIMS_C_10002_1.Init();
        }
    } catch (err) { }
});

var EIMS_C_10002_1 = {


    Init: function () {
        $("#EIMS_C_10002_1_Params").val(para);
    },

    createMsgDiv: function () { //弹出一个div层
        var temp = $(".EIMS_C_10002_1_ui-btn")[0];
        if ($("#EIMS_C_10002_1_Type_ddl").length > 0) {
            var listDiv = document.createElement("DIV");
            listDiv.id = "EIMS_C_10002_1_MsgTypeList_div";
            listDiv.style.position = "absolute";
            listDiv.style.width = document.body.scrollWidth;
            listDiv.style.height = document.documentElement.offsetHeight;
            listDiv.style.zIndex = '1';
            listDiv.style.top = ($(".EIMS_C_10002_1_ui-btn").height() + $(".EIMS_C_10002_1_ui-btn").offset().top + 1) + "px";
            //listDiv.style.left=temp.style.offsetLeft+"px";
            listDiv.style.width = temp.offsetWidth + "px";

            listDiv.style.backgroundColor = "#D7D7D7";

            //listDiv.style.opacity='0.5';
            //listDiv.style.filter="alpha(opacity=80)";
            listDiv.style.opacity = '0.9';


            var msgListDdl = $("#EIMS_C_10002_1_Type_ddl")[0];
            var innerHtml = "<ul style='list-style:none;cursor:pointer;'>";
            for (var i = 0; i < msgListDdl.children.length; i++) {
                innerHtml += "<li onmousemove='this.style.backgroundColor=\"#4b6c9e\";' onmouseout='this.style.backgroundColor=\"\";' onclick='EIMS_C_10002_1.selectMsgType(this)' value='" + msgListDdl.children[i].value + "'>" + msgListDdl.children[i].innerHTML + "</li>";
            }
            innerHtml += "</ul>";

            listDiv.innerHTML = innerHtml;
            document.body.appendChild(listDiv);
        }
    },
    selectMsgType: function (obj) { //选择留言类型
        $("#EIMS_C_10002_1_Type_ddl").val(obj.value);
        if (obj.value > 0) {
            $(".EIMS_C_10002_1_ui-btn-text").html(obj.innerHTML);
        } else {
            $(".EIMS_C_10002_1_ui-btn-text").html("请选择留言类型");
        }

        alert($('#EIMS_C_10002_1_MsgTypeList_div'));

        //关闭弹出的div层
        $('#EIMS_C_10002_1_MsgTypeList_div').remove();
    },

    CheckMsgInfo: function () { //验证留言提交字段
        if ($("#EIMS_C_10002_1_Type_ddl").length > 0) {
            var msgType = $("#EIMS_C_10002_1_Type_ddl"); //留言类型
            if (msgType.val() <= 0) {
                alert('请选择留言类型！');
                return false;
            }
        }

        if ($("#EIMS_C_10002_1_MsgContent").length > 0) {
            var msgContent = $("#EIMS_C_10002_1_MsgContent"); //留言内容
            if (msgContent.val() == "请输入留言内容..." || msgContent.val() == "") {
                alert('请输入留言内容！');
                return false;
            }
        }

        if ($("#EIMS_C_10002_1_CompanyName").length > 0) {
            var msgCompany = $("#EIMS_C_10002_1_CompanyName"); //公司名称
            if (msgCompany.val() == "公司名称" || msgCompany.val() == "") {
                alert("请输入公司名称！");
                return false;
            }
        }

        if ($("#EIMS_C_10002_1_AuthorName_Div").length > 0) {
            var msgAuthorName = $("#EIMS_C_10002_1_AuthorName"); //联系人
            if (msgAuthorName.val() == "联系人" || msgAuthorName.val() == "") {
                alert("请输入联系人姓名！");
                msgAuthorName.focus();
                return false;
            }
        }

        if ($("#EIMS_C_10002_1_Telephone_Div").length > 0) {
            var isMobile = /^1[3-8]{1}\d{9}$/;
            var isNumber = /^[0-9]*$/;  //11位数
            var isNum = /^[0-9]*[1-9][0-9]*$/; //自然数
            var isLetter=/[^0-9.]/g;

            var msgMobile = $("#EIMS_C_10002_1_Telephone"); //用户手机号
            if (msgMobile.val() == "联系人手机" || msgMobile.val() == "") {
                alert("请输入联系人手机！");
                return false;
            }

            if (isLetter.test(msgMobile.val())) {
                alert("请输入正确的手机号码！");
                return false;
            }

            if (isNum.test(msgMobile.val())) {
                if (!isNumber.test(msgMobile.val())) {
                    alert("手机号码应为11位数字，以13/14/15/17/18开头！");
                    return false;
                }

                if (!isMobile.test(msgMobile.val())) {
                    alert("手机号码格式不正确，请重新输入！");
                    return false;
                }
            }
        }

        if ($("#EIMS_C_10002_1_Email_Div").length > 0) {
            var isEmail = /^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/;

            var msgEmail = $("#EIMS_C_10002_1_Email");
            if (msgEmail.val() == "Email" || msgEmail.val() == "") {
                alert("请输入联系人邮箱！");
                return false;
            }

            if (!isEmail.test(msgEmail.val())) {
                alert("邮箱格式不正确，请重新输入！");
                return false;
            }
        }

        return true;
    },


    SubmitAdvisorys: function () {
        //提交验证
        if (!EIMS_C_10002_1.CheckMsgInfo()) {
            return false;
        }

        var Params = null;
        if (para == null) {
            alert("无效的参数！");
            return false;
        }

        if (para.indexOf(",") < 0) {
            return false;
        }

        var paras = para.split(',');
        var typeid = paras[0];
        var device = paras[1];
        var content = "";

        var magContent = $("#EIMS_C_10002_1_MsgContent").val();
        var company = $("#EIMS_C_10002_1_CompanyName").val();
        var authorName = $("#EIMS_C_10002_1_AuthorName").val();
        var email = $("#EIMS_C_10002_1_Email").val();
        var mobile = $("#EIMS_C_10002_1_Telephone").val();

        var content = "<Submit>\
                            <Content>" + magContent + "</Content>\
                            <Company>" + company + "</Company>\
                            <AuthorName>" + authorName + "</AuthorName>\
                            <Email>" + email + "</Email>\
                            <Mobile>" + mobile + "</Mobile>\
                      </Submit>";

        Params = { "TypeId": typeid, "Device": device, "content": content };

        AjaxMethod("Common", "SubmitAdvisorys", Params, function (data) {
            if (IsNullOrEmpty(data)) {
                return;
            }

            if (data.result != 1) {
                return;
            }

            alert("提交留言成功！");
            document.location.reload();
        });

    },

    CancelMsg: function () {	//取消留言
        $("#EIMS_C_10002_1_MsgContent").val("");
        $("#EIMS_C_10002_1_CompanyName").val("");
        $("#EIMS_C_10002_1_AuthorName").val("");
        $("#EIMS_C_10002_1_Telephone").val("");
        $("#EIMS_C_10002_1_Email").val("");
    }
}

/*end_feedback*/

/*xn_mc_search_1_wrap*/
$(function(){
    if($("#xn_mc_search_1_wrap").length > 0){
        /*EIMS_C_10003_1  2013-8-26 START*/
        var EIMS_C_10003_1 = {
            Init:function(){
                window.addEventListener("load", function(){
                    var moreNews = $q("#EIMS_C_10003_1_MoreNewsBtn");
                    if(moreNews==null || moreNews.length==0){
                        return;
                    }

                    var dd = window.location.href.toString();
                    moreNews[0].setAttribute("url",dd);
                });
            },
            SearchInfo:function(){
                var searTxt=$q("#EIMS_C_10003_1_SearchTxt")[0];
                if(searTxt.value.trim()==""){
                    searTxt.focus();
                    return;
                }

                var moreNews = $q("#EIMS_C_10003_1_MoreNewsBtn");
                if(moreNews==null || moreNews.length==0){
                    return;
                }
                var askUrl=moreNews[0].getAttribute("url");
                //var dd=window.location.href.toString();
                window.location.href = MergeUrlParas(askUrl, false, ["key"], [searTxt.value]);
            },
            TextEnterPress:function(e){
                var keynum;
                if(window.event){	//IE/Chrome
                    keynum=e.keyCode;
                }else if(e.which){	//Netscape/Firefox/Opere
                    keynum=e.which;
                }
                if(keynum==13){
                    EIMS_C_10003_1.SearchInfo();
                }
            }
        }
        EIMS_C_10003_1.Init();
    }
});
/*end_xn_mc_search_1_wrap*/


/*xn_mc_search_2_wrap*/
$(function () {
    if ($("#xn_mc_search_2_wrap").length>0) {
        var oKey = $(".xn_mc_search_2_key");
        var url = window.location.href;

        if(url.indexOf('?') != -1){
            var urlPara = url.split('=')[1].split('&')[0]+"";
            var oNewUrl=decodeURI(urlPara);// decodeURI()  转码

            $('.xn_mc_search_2_key').removeClass("xn_mc_search_2_cur");

            oKey.each(function(){
                var oSekfLink=$(this).find("a").html();

                if (oNewUrl==oSekfLink) {
                    $(this).addClass("xn_mc_search_2_cur");
                };
            });
        }
    };
});
/*end_xn_mc_search_2_wrap*/



/*xn_mc_about_1_wrap*/
$(function(){
    if($("#EIMS_C_10001_8Container").length > 0){
        var EIMS_C_10001 = {
            Init : function(){
                var container = $q("#EIMS_C_10001_8Container li");
                for (var ci = 0; ci < container.length; ci++) {
                    container[ci].setAttribute("index", ci + 1);
                }

                container[0].className = "EIMS_C_10001_8Active";
                var status = $q("#EIMS_C_10001_8Status li");
                if (status && status.length > 0) {
                    status[0].className = "EIMS_C_10001_8SActive";
                }

                var div = $q(".EIMS_C_10001_8DIV");
                var li = $q("#EIMS_C_10001_8Container li");
                var li = $q("#EIMS_C_10001_8Container li");
                div[0].setAttribute("loaded", "1");

                //计算滑动宽度
                window.EIMS_C_10001_8ScrollWindowWidth = function() {
                    return $("#EIMS_C_10001_8Mark").width();//document.documentElement.clientWidth;
                }

                //计算滑动窗口高度
                window.EIMS_C_10001_8ScrollWindowHeight = function() {
                    //var maxHeight = $("#ea_c").offset().top + $("#ea_c").height();
                    var maxHeight = document.documentElement.clientHeight
                    var footerBanner = $("#n_foot").outerHeight(true) + $("#cont_lx").outerHeight(true)+45;//底部栏目高度
                    return maxHeight - $("#EIMS_C_10001_8Mark").offset().top - footerBanner;
                }

                //实始化滑动DIV数据
                for (var i = div.length; i < li.length; i++) {
                    var newDiv = document.createElement("div");
                    newDiv.className = "EIMS_C_10001_8DIV loading";
                    newDiv.id = "EIMS_C_10001_8DIV" + (i + 1);
                    newDiv.style["width"] = (EIMS_C_10001_8ScrollWindowWidth() - parseInt(CurrentStyle(div[0]).paddingLeft) - parseInt(CurrentStyle(div[0]).paddingRight)) + "px";

                    $q("#EIMS_C_10001_8Move")[0].appendChild(newDiv);
                }

                //异步加载图片
                window.LoadImage = function (obj) {
                    var imgs = obj.querySelectorAll("img");
                    for (var x = 0; x < imgs.length; x++) {

                        if (CurrentStyle(imgs[x]).display == "none") {
                            continue;
                        }

                        if (IsNullOrEmpty(imgs[x].src)) {
                            var pic = imgs[x].getAttribute("loadsrc");
                            if (!IsNullOrEmpty(pic)) {
                                imgs[x].src = pic;
                            }
                        }
                    }
                }

                LoadImage($q("#EIMS_C_10001_8DIV1")[0]);

                //水平滑动
                var srcollWidth = $("#EIMS_C_10001_8Mark").width();
                window.EIMS_C_10001_8Scroll1 = new Scroll("EIMS_C_10001_8Move", 1, srcollWidth, $q("#EIMS_C_10001_8Container li").length, srcollWidth, 0, false, function (i) {
                    var div, li = $q("#EIMS_C_10001_8Container li"), status = $q("#EIMS_C_10001_8Status li");
                    if (li == null || li.length <= 0) {
                        return;
                    }

                    div = $q(".EIMS_C_10001_8DIV")[i];

                    for (var j = 0; j < li.length; j++) {
                        li[j].className = "EIMS_C_10001_8Default";
                        if (status && status.length > 0) {
                            status[j].className = "EIMS_C_10001_8SDefault";
                        }
                    }

                    li[i].className = "EIMS_C_10001_8Active";
                    if (status && status.length > 0) {
                        status[i].className = "EIMS_C_10001_8SActive";
                    }

                    setTimeout(function () {
                        if (div.getAttribute("loaded") == "1") {
                            return;
                        }

                        var url = li[i].getAttribute("href");
                        if (url == null || url == "" || typeof url == undefined) {
                            return;
                        }

                        new Ajax().getData(url, "", function (data, script) {
                            var div = $q(".EIMS_C_10001_8DIV")[i];

                            div.setAttribute("loaded", "1");
                            div.className = "EIMS_C_10001_8DIV";

                            div.innerHTML = data;

                            //重置滑动高度
                            EIMS_C_10001_8Scroll1.vscroll[i].resize(EIMS_C_10001_8ScrollWindowHeight());

                            setTimeout(function () {
                                LoadImage(div);
                            }, 100);

                            if (script != "") {
                                eval(script);
                            }
                        });

                    }, 250);
                }, function () {
                    var bar = $q(".scrollBar");
                    for (var i = 0; i < bar.length; i++) {
                        bar[i].style["opacity"] = "0";
                    }
                });

                //初始化垂直滑动
                EIMS_C_10001_8Scroll1.vscroll = {};
                for (var i = 0; i < li.length; i++) {

                    var scrollHeight = $q("#EIMS_C_10001_8DIV" + (i + 1))[0].scrollHeight;
                    var divHeight = EIMS_C_10001_8ScrollWindowHeight();

                    EIMS_C_10001_8Scroll1.vscroll[i] = new Scroll("EIMS_C_10001_8DIV" + (i + 1), 2, divHeight, scrollHeight / divHeight, document.documentElement.clientWidth, divHeight, true, null, null, true);
                }

                //点击滑动
                window.EIMS_C_10001_8GoType = function (obj) {
                    var index = parseInt(obj.getAttribute("index") - 1);
                    EIMS_C_10001_8Scroll1.goPage(index);
                };

                //浏览器缩放事件
                window.EIMS_C_10001_8Resize = function () {
                    var types = $q(".EIMS_C_10001_8DIV");
                    var width = parseInt($q("#EIMS_C_10001_8Mark")[0].offsetWidth - 20) + "px";
                    for (var i = 0; i < types.length; i++) {
                        types[i].style["width"] = width;
                    }

                    //重置滑动宽度
                    EIMS_C_10001_8Scroll1.setMovingLength(EIMS_C_10001_8ScrollWindowWidth());

                    //重置滑动高度
                    var li = $q("#EIMS_C_10001_8Container li");
                    for (var i = 0; i < li.length; i++) {
                        if (EIMS_C_10001_8Scroll1.vscroll[i]) {
                            EIMS_C_10001_8Scroll1.vscroll[i].resize(EIMS_C_10001_8ScrollWindowHeight());
                        }
                    }
                };

                window.addEventListener("resize", function () {
                    EIMS_C_10001_8Resize();
                });

                EIMS_C_10001_8Resize();
            }
        }
        var h1 = document.documentElement.clientHeight;
        var h2 = document.getElementById("EIMS_C_10001_8Container").offsetHeight;
        var h3 = 0;
        if (document.getElementById("nav")){
            h3 = document.getElementById("nav").offsetHeight;
        }

        var h4 = 0;
        if (document.getElementById("ea_b")){
            h4 = document.getElementById("ea_b").offsetHeight;
        }

        var result = h1 - h2 - h3 - h4 - 95;
        document.getElementById("EIMS_C_10001_8Mark").style.height = result + "px";
        EIMS_C_10001.Init();
    }
});
/*end_xn_mc_about_1_wrap*/

/*xn_mc_prodv_2_wrap*/
/*EIMS_C_10009_1 v3.4.13  data 2014/04/29*/
$(function () {
    //获取url
    var bool_pc_phone = /\/m\//i.test(document.location.href); //判断手机还是pc false为pc true为手机

    try {
        if (bool_pc_phone) {
            EIMS_C_10009_1.Init_phone(1);  /*加载手机数据和事件*/
        } else {
            EIMS_C_10009_1.Init_pc(1); /*加载pc数据和事件*/
        }
    } catch (e) { }

});

var EIMS_C_10009_1 = {
    Init_pc: function (EIMS_C_10009_1_imgStyle) {
        /*图片样式 1 为淡入淡出*/
        var EIMS_C_10009_1_imgStyl = EIMS_C_10009_1_imgStyle;

        if ($("#EIMS_C_10009_1_sImgList img").length <= 0)
        { return; }
        //加载第一张小图给大图
        $("#EIMS_C_10009_1_showimg img").eq(0).attr('src', $("#EIMS_C_10009_1_sImgList  img").eq(0).attr('src'));

        /*加载的图片进行设置*/
        $("#EIMS_C_10009_1_showimg img").css('width', $("#EIMS_C_10009_1_bigimg").css("width"));
        $("#EIMS_C_10009_1_showimg img").css('height', $("#EIMS_C_10009_1_bigimg").css("height"));


        /*图片淡入淡出需要的参数*/
        var EIMS_C_10009_1_showimg_img;
        function EIMS_C_10009_1_imgStyleFade(src) {
            /*图片淡出*/
            $("#EIMS_C_10009_1_showimg img").eq(0).fadeOut("slow");
            /*图片淡入*/
            clearInterval(EIMS_C_10009_1_showimg_img);
            EIMS_C_10009_1_showimg_img = setInterval(function () {
                $("#EIMS_C_10009_1_showimg img").eq(0).attr('src', src).fadeIn("slow");
                clearInterval(EIMS_C_10009_1_showimg_img);
            }, 500);
        }

        /*图片加载事件*/
        $("#EIMS_C_10009_1_sImgList  img").each(function (i) {
            $("#EIMS_C_10009_1_sImgList  img").eq(i).click(function () {
                $("#EIMS_C_10009_1_sImgList  li").eq(i).addClass("no").siblings().removeClass("no");
                switch (EIMS_C_10009_1_imgStyle) {
                    case 1:
                        EIMS_C_10009_1_imgStyleFade($(this).attr('src'));
                        break;
                    default:
                        break;
                }
            });
        });

        /*获取界面上面需要的div高度宽度*/

        var EIMS_C_10009_1_sImgList_li_marginleft = parseInt($("#EIMS_C_10009_1_sImgList li").css('margin-left'));
        var EIMS_C_10009_1_sImgList_li_width = parseInt($("#EIMS_C_10009_1_sImgList li").css('width'));
        var EIMS_C_10009_1_sImgList_li_length = $("#EIMS_C_10009_1_sImgList li").length;
        var EIMS_C_10009_1_sImgList_li_border = parseInt($("#EIMS_C_10009_1_sImgList  li").css("border-left-width")) + parseInt($("#EIMS_C_10009_1_sImgList  li").css("border-right-width"));

        if (EIMS_C_10009_1_sImgList_li_border > 0) {
            $("#EIMS_C_10009_1_sImgList").css("width", 2 + EIMS_C_10009_1_sImgList_li_length * (EIMS_C_10009_1_sImgList_li_width + EIMS_C_10009_1_sImgList_li_marginleft * 2 + EIMS_C_10009_1_sImgList_li_border) + "px");
        } else {
            $("#EIMS_C_10009_1_sImgList").css("width", 2 + EIMS_C_10009_1_sImgList_li_length * (EIMS_C_10009_1_sImgList_li_width + EIMS_C_10009_1_sImgList_li_marginleft * 2) + "px");
        }

        var EIMS_C_10009_1_smallimg_width = parseInt($("#EIMS_C_10009_1_smallimg").css("width"));
        var EIMS_C_10009_1_but_width = parseInt($("#EIMS_C_10009_1_butleft").css("width")) * 2;
        var EIMS_C_10009_1_sImgList_width = parseInt($("#EIMS_C_10009_1_sImgList").css("width"));
        var EIMS_C_10009_1_sImgList_paddingleft = parseInt($("#EIMS_C_10009_1_sImgList").css('padding-left'));
        var EIMS_C_10009_1_sImgList_left = $("#EIMS_C_10009_1_sImgList").offset().left;

        /*点击滑动图片 向左*/
        var EIMS_C_10009_1_butleft_click;
        var EIMS_C_10009_1_butleft_click_bool = true;
        $("#EIMS_C_10009_1_butleft").click(function () {

            /*禁掉用户在300毫米内点击多次*/
            if (!EIMS_C_10009_1_butleft_click_bool) {
                return;
            }

            EIMS_C_10009_1_butleft_click_bool = false;
            EIMS_C_10009_1_butleft_click = setInterval(function () {
                EIMS_C_10009_1_butleft_click_bool = true;
                clearInterval(EIMS_C_10009_1_butleft_click);
            }, 300);

            var EIMS_C_10009_1_sImgList_left1 = $("#EIMS_C_10009_1_sImgList").offset().left;
            var var_width = -1 * (EIMS_C_10009_1_sImgList_li_width + EIMS_C_10009_1_sImgList_li_marginleft) * 4; //切换高度
            $("#EIMS_C_10009_1_sImgList").animate({ left: (EIMS_C_10009_1_sImgList_left1 + var_width) + "px" });

            if (EIMS_C_10009_1_sImgList_width <= (EIMS_C_10009_1_smallimg_width - EIMS_C_10009_1_but_width)) {
                $("#EIMS_C_10009_1_sImgList").animate({ left: 0 + "px" }, 300);
                return;
            } else if (EIMS_C_10009_1_sImgList_left1 + var_width < ((EIMS_C_10009_1_sImgList_width + EIMS_C_10009_1_sImgList_paddingleft) - (EIMS_C_10009_1_smallimg_width - EIMS_C_10009_1_but_width)) * -1) {
                $("#EIMS_C_10009_1_sImgList").animate({ left: (((EIMS_C_10009_1_sImgList_width + EIMS_C_10009_1_sImgList_paddingleft) - (EIMS_C_10009_1_smallimg_width - EIMS_C_10009_1_but_width)) - EIMS_C_10009_1_sImgList_paddingleft) * -1 + "px" }, 300);
                return;
            }

        });



        /*点击滑动图片 向右*/
        var EIMS_C_10009_1_butright_click;
        var EIMS_C_10009_1_butright_click_bool = true;
        $("#EIMS_C_10009_1_butright").click(function () {

            /*禁掉用户在300毫米内点击多次*/
            if (!EIMS_C_10009_1_butright_click_bool) {
                return;
            }
            EIMS_C_10009_1_butright_click_bool = false;
            EIMS_C_10009_1_butright_click = setInterval(function () {
                EIMS_C_10009_1_butright_click_bool = true;
                clearInterval(EIMS_C_10009_1_butright_click);
            }, 300);

            var EIMS_C_10009_1_sImgList_left1 = $("#EIMS_C_10009_1_sImgList").offset().left;
            var var_width = -1 * (EIMS_C_10009_1_sImgList_li_width + EIMS_C_10009_1_sImgList_li_marginleft) * 4; //切换高度
            $("#EIMS_C_10009_1_sImgList").animate({ left: (EIMS_C_10009_1_sImgList_left1 - var_width) + "px" });
            if (EIMS_C_10009_1_sImgList_left1 > EIMS_C_10009_1_sImgList_left + var_width) {
                $("#EIMS_C_10009_1_sImgList").animate({ left: 0 + "px" }, 300);
            }
        });

    },
    Init_phone: function (EIMS_C_10009_1_imgStyle) {
        /*图片样式 1 为淡入淡出*/
        var EIMS_C_10009_1_imgStyl = EIMS_C_10009_1_imgStyle;

        var EIMS_C_10009_1_sImgList_img_length = $("#EIMS_C_10009_1_sImgList img").length;
        if (EIMS_C_10009_1_sImgList_img_length <= 0)
        { return; }

        var i = 0;
        var EIMS_C_10009_1_showimg_div = "";
        for (i; i < EIMS_C_10009_1_sImgList_img_length; i++) {
            if (i == 0) {
                EIMS_C_10009_1_showimg_div += "<div id='EIMS_C_10009_1_showimg_fade' style='background-color:White;display:none;position: absolute;z-index1000'></div><div id='EIMS_C_10009_1_showimg_div' style='white-space:nowrap'  ><img id='idImage' alt='' src=" + $("#EIMS_C_10009_1_sImgList img").eq(i).attr('src') + " />";
            }
            else {
                EIMS_C_10009_1_showimg_div += "<img id='idImage' alt='' src=" + $("#EIMS_C_10009_1_sImgList img").eq(i).attr('src') + " />";
            }
        }
        if (i >= EIMS_C_10009_1_sImgList_img_length) {
            EIMS_C_10009_1_showimg_div += "</div>";
            $("#EIMS_C_10009_1_showimg").html(EIMS_C_10009_1_showimg_div);
        }

        /*加载的图片进行设置*/
        $("#EIMS_C_10009_1_showimg img").css('width', $("#EIMS_C_10009_1_bigimg").css("width"));
        $("#EIMS_C_10009_1_showimg img").css('height', $("#EIMS_C_10009_1_bigimg").css("height"));
        $("#EIMS_C_10009_1_showimg_div").css('width', $("#EIMS_C_10009_1_bigimg").css("width"));
        $("#EIMS_C_10009_1_showimg_fade").css('width', $("#EIMS_C_10009_1_bigimg").css("width"));
        $("#EIMS_C_10009_1_showimg_fade").css('height', $("#EIMS_C_10009_1_bigimg").css("height"));
        $("#EIMS_C_10009_1_sImgList").css('width', $("#EIMS_C_10009_1_smallimg").css("width"));

        /*获取界面上面需要的div高度宽度*/
        var EIMS_C_10009_1_sImgList_li_width = parseInt($("#EIMS_C_10009_1_sImgList li").css('width'));
        var EIMS_C_10009_1_sImgList_li_height = parseInt($("#EIMS_C_10009_1_sImgList li").css('height'));
        $("#EIMS_C_10009_1_sImgList  li").eq(0).addClass("no").siblings().removeClass("no");
        /*手机端图片滑动*/
        $('#EIMS_C_10009_1_sImgList ul').promptumenu({
            'width': parseInt(EIMS_C_10009_1_sImgList_li_width),
            'height': parseInt(EIMS_C_10009_1_sImgList_li_height),
            'rows': 1,
            'columns': 1,
            'pages': false,
            'inertia': 100,
            'smallimg10009': 'EIMS_C_10009_1_smallimg',
            'but10009': 'EIMS_C_10009_1_butleft',
            'sImgList10009': 'EIMS_C_10009_1_sImgList'
        });

        /*图片淡入淡出需要的参数*/
        var EIMS_C_10009_1_showimg_img;
        function EIMS_C_10009_1_imgStyleFade(i) {
            /*图片淡入*/
            clearInterval(EIMS_C_10009_1_showimg_img);
            EIMS_C_10009_1_showimg_img = setInterval(function () {

                // $("#EIMS_C_10009_1_showimg_fade").css('display', "none");
                var EIMS_C_10009_1_showimg_img_width = parseInt($("#EIMS_C_10009_1_showimg img").eq(i).css("width"));
                $("#EIMS_C_10009_1_showimg_div").css("margin-left", parseInt(EIMS_C_10009_1_showimg_img_width) - (i + 1) * parseInt(EIMS_C_10009_1_showimg_img_width));
                $("#EIMS_C_10009_1_showimg_fade").css('display', "none");
                clearInterval(EIMS_C_10009_1_showimg_img);
            }, 500);
        }

        /*图片点击事件*/
        $("#EIMS_C_10009_1_sImgList  img").each(function (i) {
            $("#EIMS_C_10009_1_sImgList  img").eq(i).click(function () {
                $("#EIMS_C_10009_1_sImgList  li").eq(i).addClass("no").siblings().removeClass("no");
                $("#EIMS_C_10009_1_showimg_fade").fadeIn("slow");
                // $("#EIMS_C_10009_1_showimg_fade").css('display', "block");
                // $("#EIMS_C_10009_1_showimg_div img").eq(i).fadeIn("slow");
                EIMS_C_10009_1_imgStyleFade(i);
            });
        });


        /*滑动的坐标进行初始化*/
        var startX = 0, startY = 0;
        var movex = 0, movey = 0;
        var startXul = 0, startYul = 0;
        var movexul = 0, moveyul = 0;
        var EIMS_C_10009_1_showimg_div_left = 0;

        /*按下*/
        function touchSatrtFunc(evt) {
            try {
                evt.preventDefault(); //阻止触摸时浏览器的缩放、滚动条滚动等
                var touch = evt.touches[0]; //获取第一个触点
                var x = Number(touch.pageX); //页面触点X坐标
                var y = Number(touch.pageY); //页面触点Y坐标
                //记录触点初始位置
                startX = x;
                startY = y;
                EIMS_C_10009_1_showimg_div_left = parseInt($("#EIMS_C_10009_1_showimg_div").css("margin-left"));
            }
            catch (e) {
            }
        }

        var EIMS_C_10009_1_showimg_div = parseInt($("#EIMS_C_10009_1_showimg img").eq(0).css("width"));
        /*滑动*/
        function touchMoveFunc(evt) {
            try {
                evt.preventDefault(); //阻止触摸时浏览器的缩放、滚动条滚动等
                var touch = evt.touches[0]; //获取第一个触点
                movex = Number(touch.pageX); //页面触点X坐标
                movey = Number(touch.pageY); //页面触点Y坐标

                var EIMS_C_10009_1_showimg_div_left_change = parseInt($("#EIMS_C_10009_1_showimg_div").css("margin-left"));

                if (movex - startX > 50) {
                    if (parseInt(EIMS_C_10009_1_showimg_div_left_change) < 0 && (movey - startY) < parseInt(EIMS_C_10009_1_showimg_div)) {
                        $("#EIMS_C_10009_1_showimg_div").css("margin-left", parseInt(EIMS_C_10009_1_showimg_div_left_change) + 10);
                    }
                }

                if (movex - startX < -50) {
                    if (-(movey - startY) > -EIMS_C_10009_1_showimg_div && parseInt(EIMS_C_10009_1_showimg_div_left_change) <= 0 && (parseInt(EIMS_C_10009_1_showimg_div_left_change) + parseInt(-EIMS_C_10009_1_showimg_div)) > -$("#EIMS_C_10009_1_sImgList img").length * parseInt(EIMS_C_10009_1_showimg_div)) {
                        $("#EIMS_C_10009_1_showimg_div").css("margin-left", parseInt(EIMS_C_10009_1_showimg_div_left_change) - 10);
                    }
                }

            }
            catch (e) {
            }
        }
        /*离开*/
        function touchEndFunc(evt) {
            try {
                evt.preventDefault(); //阻止触摸时浏览器的缩放、滚动条滚动等
                //判断滑动方向
                var but_width = 0;
                if ($("#EIMS_C_10009_1_butleft").css("display") != "none") {
                    but_width = parseInt($("#EIMS_C_10009_1_butleft").css("width")) * 2;
                }
                if (movex - startX > 50) {
                    if (parseInt(EIMS_C_10009_1_showimg_div_left) < 0) {

                        var EIMS_C_10009_1_showimg_div_left_remainder = parseInt(EIMS_C_10009_1_showimg_div_left) % parseInt(EIMS_C_10009_1_showimg_div);
                        $("#EIMS_C_10009_1_showimg_div").css("margin-left", parseInt(EIMS_C_10009_1_showimg_div_left) + parseInt(EIMS_C_10009_1_showimg_div) - ((parseInt(EIMS_C_10009_1_showimg_div_left) + parseInt(EIMS_C_10009_1_showimg_div)) % parseInt(EIMS_C_10009_1_showimg_div)));

                        var EIMS_C_10009_1_sImgList_li_few = -1 * (parseInt(EIMS_C_10009_1_showimg_div_left) + parseInt(EIMS_C_10009_1_showimg_div) - ((parseInt(EIMS_C_10009_1_showimg_div_left) + parseInt(EIMS_C_10009_1_showimg_div)) % parseInt(EIMS_C_10009_1_showimg_div))) / parseInt(EIMS_C_10009_1_showimg_div);

                        if (EIMS_C_10009_1_sImgList_li_few == 0) {
                            $("#EIMS_C_10009_1_sImgList  li").eq(EIMS_C_10009_1_sImgList_li_few).addClass("no").siblings().removeClass("no");
                            $("#EIMS_C_10009_1_sImgList ul").animate({ left: 0 + "px" }, 100)
                            return;
                        }
                        if (parseInt($("#EIMS_C_10009_1_sImgList ul").css("width")) > (parseInt($("#EIMS_C_10009_1_smallimg").css("width")) - (but_width))) {
                            $("#EIMS_C_10009_1_sImgList  li").eq(EIMS_C_10009_1_sImgList_li_few).addClass("no").siblings().removeClass("no");
                            if ($("#EIMS_C_10009_1_sImgList  li").eq(EIMS_C_10009_1_sImgList_li_few).offset().left > (parseInt($("#EIMS_C_10009_1_smallimg").css("width")) - (but_width)) - parseInt($("#EIMS_C_10009_1_sImgList li").css("width"))) {
                                $("#EIMS_C_10009_1_sImgList ul").animate({ left: (($("#EIMS_C_10009_1_sImgList ul").offset().left + ((parseInt($("#EIMS_C_10009_1_smallimg").css("width")) - (but_width)) - $("#EIMS_C_10009_1_sImgList  li").eq(EIMS_C_10009_1_sImgList_li_few).offset().left)) - parseInt($("#EIMS_C_10009_1_sImgList  li").eq(EIMS_C_10009_1_sImgList_li_few).css("width"))) + "px" }, 100);
                                return;
                            } else if ($("#EIMS_C_10009_1_sImgList  li").eq(EIMS_C_10009_1_sImgList_li_few).offset().left < 0) {
                                $("#EIMS_C_10009_1_sImgList ul").animate({ left: ($("#EIMS_C_10009_1_sImgList ul").offset().left - ($("#EIMS_C_10009_1_sImgList ul").offset().left - $("#EIMS_C_10009_1_sImgList  li").eq(EIMS_C_10009_1_sImgList_li_few).offset().left)) + "px" }, 100);

                                return;
                            }

                        }
                        else {
                            $("#EIMS_C_10009_1_sImgList  li").eq(EIMS_C_10009_1_sImgList_li_few).addClass("no").siblings().removeClass("no");
                        }
                        return;
                    }
                }

                if (movex - startX > 0) {
                    $("#EIMS_C_10009_1_showimg_div").css("margin-left", parseInt(EIMS_C_10009_1_showimg_div_left));
                    return;
                }

                if (movex - startX < -50) {
                    if ((parseInt(EIMS_C_10009_1_showimg_div_left) + parseInt(-EIMS_C_10009_1_showimg_div)) > -($("#EIMS_C_10009_1_sImgList img").length * parseInt(EIMS_C_10009_1_showimg_div))) {
                        $("#EIMS_C_10009_1_showimg_div").css("margin-left", parseInt(EIMS_C_10009_1_showimg_div_left) + parseInt(-EIMS_C_10009_1_showimg_div) - ((parseInt(EIMS_C_10009_1_showimg_div_left) + parseInt(EIMS_C_10009_1_showimg_div)) % parseInt(EIMS_C_10009_1_showimg_div)));
                        var EIMS_C_10009_1_sImgList_li_few = -1 * (parseInt(EIMS_C_10009_1_showimg_div_left) + parseInt(-EIMS_C_10009_1_showimg_div) - ((parseInt(EIMS_C_10009_1_showimg_div_left) + parseInt(EIMS_C_10009_1_showimg_div)) % parseInt(EIMS_C_10009_1_showimg_div))) / parseInt(EIMS_C_10009_1_showimg_div);

                        if (EIMS_C_10009_1_sImgList_li_few == 0) {
                            $("#EIMS_C_10009_1_sImgList  li").eq(EIMS_C_10009_1_sImgList_li_few).addClass("no").siblings().removeClass("no");
                            $("#EIMS_C_10009_1_sImgList ul").animate({ left: 0 + "px" }, 200)
                            return;
                        }
                        if (parseInt($("#EIMS_C_10009_1_sImgList ul").css("width")) > (parseInt($("#EIMS_C_10009_1_smallimg").css("width")) - (but_width))) {
                            $("#EIMS_C_10009_1_sImgList  li").eq(EIMS_C_10009_1_sImgList_li_few).addClass("no").siblings().removeClass("no");
                            if ($("#EIMS_C_10009_1_sImgList  li").eq(EIMS_C_10009_1_sImgList_li_few).offset().left > (parseInt($("#EIMS_C_10009_1_smallimg").css("width")) - (but_width)) - parseInt($("#EIMS_C_10009_1_sImgList li").css("width"))) {
                                $("#EIMS_C_10009_1_sImgList ul").animate({ left: (($("#EIMS_C_10009_1_sImgList ul").offset().left + ((parseInt($("#EIMS_C_10009_1_smallimg").css("width")) - (but_width)) - $("#EIMS_C_10009_1_sImgList  li").eq(EIMS_C_10009_1_sImgList_li_few).offset().left)) - parseInt($("#EIMS_C_10009_1_sImgList  li").eq(EIMS_C_10009_1_sImgList_li_few).css("width"))) + "px" }, 200);

                                // $("#EIMS_C_10009_1_sImgList ul").animate({ left: -1 * ((parseInt($("#EIMS_C_10009_1_sImgList ul").css("width")) - (parseInt($("#" + f.smallimg10010).css("height").split('p')[0]) - (parseInt($("#" + f.but10010).css("height").split('p')[0]) * 2)) - parseInt($("#" + f.sImgList10010).css('padding-top').split('p')[0]))) + "px" }, 200);
                                //  alert((($("#EIMS_C_10009_1_sImgList ul").offset().left + ((parseInt($("#EIMS_C_10009_1_smallimg").css("width")) - (but_width)) - $("#EIMS_C_10009_1_sImgList  li").eq(EIMS_C_10009_1_sImgList_li_few).offset().left)) - parseInt($("#EIMS_C_10009_1_sImgList  li").eq(EIMS_C_10009_1_sImgList_li_few).css("width"))));

                                return;
                            } else if ($("#EIMS_C_10009_1_sImgList  li").eq(EIMS_C_10009_1_sImgList_li_few).offset().left < 0) {
                                $("#EIMS_C_10009_1_sImgList ul").animate({ left: ($("#EIMS_C_10009_1_sImgList ul").offset().left - ($("#EIMS_C_10009_1_sImgList ul").offset().left - $("#EIMS_C_10009_1_sImgList  li").eq(EIMS_C_10009_1_sImgList_li_few).offset().left)) + "px" }, 200);
                                return;
                            }

                        }
                        else {
                            $("#EIMS_C_10009_1_sImgList  li").eq(EIMS_C_10009_1_sImgList_li_few).addClass("no").siblings().removeClass("no");
                        }
                        return;
                    }
                }

                if (movex - startX < 0) {
                    $("#EIMS_C_10009_1_showimg_div").css("margin-left", parseInt(EIMS_C_10009_1_showimg_div_left));
                    return;
                }

            }
            catch (e) {
            }
        }
        //绑定手机触摸事件
        function bindEvent() {
            try {
                document.getElementById("EIMS_C_10009_1_showimg_div").addEventListener('touchstart', touchSatrtFunc, false);
                document.getElementById("EIMS_C_10009_1_showimg_div").addEventListener('touchmove', touchMoveFunc, false);
                document.getElementById("EIMS_C_10009_1_showimg_div").addEventListener('touchend', touchEndFunc, false);
            }
            catch (e) {
            }
        }
        bindEvent();

    }
}

/*EIMS_C_10009_1 end*/
/*end_xn_mc_prodv_2_wrap*/


/*EIMS_C_10010_1 v3.4.13  data 2014/04/29*/
try{
    $(function () {
        //获取url
        var bool_pc_phone = /\/m\//i.test(document.location.href); //判断手机还是pc false为pc true为手机

        try {
            if (bool_pc_phone) {
                EIMS_C_10010_1.Init_phone(1); /*加载手机数据和事件*/
            } else {
                EIMS_C_10010_1.Init_pc(1); /*加载pc数据和事件*/
            }
        } catch (e) { }
    });

    var EIMS_C_10010_1 = {

        Init_pc: function (EIMS_C_10010_1_imgStyle) {
            /*图片样式 1 为淡入淡出*/
            var EIMS_C_10010_1_imgStyle = EIMS_C_10010_1_imgStyle;

            if ($("#EIMS_C_10010_1_sImgList img").length <= 0) {
                return;
            }

            //加载第一张小图给大图
            $("#EIMS_C_10010_1_showimg img").eq(0).attr('src', $("#EIMS_C_10010_1_sImgList  img").eq(0).attr('src'));

            /*加载的图片进行设置*/
            $("#EIMS_C_10010_1_showimg img").css('width', $("#EIMS_C_10010_1_bigimg").css("width"));
            $("#EIMS_C_10010_1_showimg img").css('height', $("#EIMS_C_10010_1_bigimg").css("height"));


            /*图片淡入淡出需要的参数*/
            var EIMS_C_10010_1_showimg_img;
            function EIMS_C_10010_1_imgStyleFade(src) {
                /*图片淡出*/
                $("#EIMS_C_10010_1_showimg img").eq(0).fadeOut("slow");
                /*图片淡入*/
                clearInterval(EIMS_C_10010_1_showimg_img);
                EIMS_C_10010_1_showimg_img = setInterval(function () {
                    $("#EIMS_C_10010_1_showimg img").eq(0).attr('src', src).fadeIn("slow");
                    clearInterval(EIMS_C_10010_1_showimg_img);
                }, 500);
            }

            /*图片加载事件*/
            $("#EIMS_C_10010_1_sImgList  img").each(function (i) {
                $("#EIMS_C_10010_1_sImgList  img").eq(i).click(function () {
                    // $("#EIMS_C_10010_1_sImgList  li").eq(i).addClass("no").siblings().removeClass("no");
                    switch (EIMS_C_10010_1_imgStyle) {
                        case 1:
                            EIMS_C_10010_1_imgStyleFade($(this).attr('src'));
                            break;
                        default:
                            break;
                    }
                });
            });

            /*获取界面上面需要的div高度宽度*/
            var EIMS_C_10010_1_smallimg_height = parseInt($("#EIMS_C_10010_1_smallimg").css("height"));
            var EIMS_C_10010_1_but_height = parseInt($("#EIMS_C_10010_1_buttop").css("height")) * 2;

            var EIMS_C_10010_1_sImgList_height = parseInt($("#EIMS_C_10010_1_sImgList").css("height"));
            var EIMS_C_10010_1_sImgList_paddingtop = parseInt($("#EIMS_C_10010_1_sImgList").css('padding-top'));

            var EIMS_C_10010_1_sImgList_li_margintop = parseInt($("#EIMS_C_10010_1_sImgList li").css('margin-top'));

            var EIMS_C_10010_1_sImgList_li_height = parseInt($("#EIMS_C_10010_1_sImgList li").css('height'));
            var EIMS_C_10010_1_sImgList_li_length = $("#EIMS_C_10010_1_sImgList li").length;
            var EIMS_C_10010_1_sImgList_top = $("#EIMS_C_10010_1_sImgList").offset().top;

            /*点击滑动图片 向上*/
            var EIMS_C_10010_1_buttop_click;
            var EIMS_C_10010_1_buttop_click_bool = true;
            $("#EIMS_C_10010_1_buttop").click(function () {

                /*禁掉用户在300毫米内点击多次*/
                if (!EIMS_C_10010_1_buttop_click_bool) {
                    return;
                }
                EIMS_C_10010_1_buttop_click_bool = false;
                EIMS_C_10010_1_buttop_click = setInterval(function () {
                    EIMS_C_10010_1_buttop_click_bool = true;
                    clearInterval(EIMS_C_10010_1_buttop_click);
                }, 300);


                var EIMS_C_10010_1_sImgList_topl = $("#EIMS_C_10010_1_sImgList").offset().top;
                var var_height = -1 * (EIMS_C_10010_1_sImgList_li_height + EIMS_C_10010_1_sImgList_li_margintop * 2) * 4; //切换高度
                $("#EIMS_C_10010_1_sImgList").animate({ top: (var_height + EIMS_C_10010_1_sImgList_topl + EIMS_C_10010_1_sImgList_top) + "px" });
                if (EIMS_C_10010_1_sImgList_height <= (EIMS_C_10010_1_smallimg_height - EIMS_C_10010_1_but_height)) {
                    $("#EIMS_C_10010_1_sImgList").animate({ top: 0 + "px" }, 300);
                } else if (EIMS_C_10010_1_sImgList_topl + var_height < ((EIMS_C_10010_1_sImgList_height + EIMS_C_10010_1_sImgList_paddingtop) - (EIMS_C_10010_1_smallimg_height - EIMS_C_10010_1_but_height)) * -1) {
                    $("#EIMS_C_10010_1_sImgList").animate({ top: (((EIMS_C_10010_1_sImgList_height + EIMS_C_10010_1_sImgList_paddingtop) - (EIMS_C_10010_1_smallimg_height - EIMS_C_10010_1_but_height)) - EIMS_C_10010_1_sImgList_paddingtop) * -1 + "px" }, 300);
                }

            });

            /*点击滑动图片 向下*/
            var EIMS_C_10010_1_butbottom_click;
            var EIMS_C_10010_1_butbottom_click_bool = true;
            $("#EIMS_C_10010_1_butbottom").click(function () {

                /*禁掉用户在300毫米内点击多次*/
                if (!EIMS_C_10010_1_butbottom_click_bool) {
                    return;
                }
                EIMS_C_10010_1_butbottom_click_bool = false;
                EIMS_C_10010_1_butbottom_click = setInterval(function () {
                    EIMS_C_10010_1_butbottom_click_bool = true;
                    clearInterval(EIMS_C_10010_1_butbottom_click);
                }, 300);

                var EIMS_C_10010_1_sImgList_top_l = $("#EIMS_C_10010_1_sImgList").offset().top;
                var var_height = -1 * (EIMS_C_10010_1_sImgList_li_height + EIMS_C_10010_1_sImgList_li_margintop * 2) * 4; //切换高度
                $("#EIMS_C_10010_1_sImgList").animate({ top: (EIMS_C_10010_1_sImgList_top_l - var_height) + "px" });
                if (EIMS_C_10010_1_sImgList_top_l > EIMS_C_10010_1_sImgList_top + var_height) {
                    $("#EIMS_C_10010_1_sImgList").animate({ top: 0 + "px" }, 300);
                }
            });

        },
        Init_phone: function (EIMS_C_10010_1_imgStyle) {
            /*图片样式 1 为淡入淡出*/
            var EIMS_C_10010_1_imgStyle = EIMS_C_10010_1_imgStyle;

            var EIMS_C_10010_1_sImgList_img_length = $("#EIMS_C_10010_1_sImgList img").length;
            if (EIMS_C_10010_1_sImgList_img_length <= 0)
            { return; }

            var i = 0;
            var EIMS_C_10010_1_showimg_div = "";
            for (i; i < EIMS_C_10010_1_sImgList_img_length; i++) {
                if (i == 0) {
                    EIMS_C_10010_1_showimg_div += "<div id='EIMS_C_10010_1_showimg_fade' style='background-color:White;display:none;position: absolute;z-index1000'></div><div id='EIMS_C_10010_1_showimg_div' style='white-space: nowrap;'  ><img id='idImage' alt='' src=" + $("#EIMS_C_10010_1_sImgList img").eq(i).attr('src') + " />";
                }
                else {
                    EIMS_C_10010_1_showimg_div += "<img id='idImage' alt='' src=" + $("#EIMS_C_10010_1_sImgList img").eq(i).attr('src') + " />";
                }
            }
            if (i >= EIMS_C_10010_1_sImgList_img_length) {
                EIMS_C_10010_1_showimg_div += "</div>";
                $("#EIMS_C_10010_1_showimg").html(EIMS_C_10010_1_showimg_div);
            }

            /*加载的图片进行设置*/
            $("#EIMS_C_10010_1_showimg img").css('width', $("#EIMS_C_10010_1_bigimg").css("width"));
            $("#EIMS_C_10010_1_showimg img").css('height', $("#EIMS_C_10010_1_bigimg").css("height"));
            $("#EIMS_C_10010_1_showimg_div").css('height', $("#EIMS_C_10010_1_bigimg").css("height"));
            $("#EIMS_C_10010_1_showimg_fade").css('width', $("#EIMS_C_10010_1_bigimg").css("width"));
            $("#EIMS_C_10010_1_showimg_fade").css('height', $("#EIMS_C_10010_1_bigimg").css("height"));
            $("#EIMS_C_10010_1_sImgList").css('height', $("#EIMS_C_10010_1_smallimg").css("height"));

            /*获取界面上面需要的div高度宽度*/
            var EIMS_C_10010_1_sImgList_li_width = parseInt($("#EIMS_C_10010_1_sImgList li").css('width'));
            var EIMS_C_10010_1_sImgList_li_height = parseInt($("#EIMS_C_10010_1_sImgList li").css('height'));

            $("#EIMS_C_10010_1_sImgList  li").eq(0).addClass("no").siblings().removeClass("no");
            /*手机端图片滑动*/
            $('#EIMS_C_10010_1_sImgList ul').promptumenu({
                'width': parseInt(EIMS_C_10010_1_sImgList_li_width),
                'height': parseInt(EIMS_C_10010_1_sImgList_li_height),
                'direction': 'vertical',
                'rows': 1,
                'columns': 1,
                'pages': false,
                'inertia': 100,
                'smallimg10009': 'EIMS_C_10010_1_smallimg',
                'but10009': 'EIMS_C_10010_1_buttop',
                'sImgList10009': 'EIMS_C_10010_1_sImgList'
            });

            /*图片淡入淡出需要的参数*/
            var EIMS_C_10010_1_showimg_img;
            function EIMS_C_10010_1_imgStyleFade(i) {
                /*图片淡入*/
                clearInterval(EIMS_C_10010_1_showimg_img);
                EIMS_C_10010_1_showimg_img = setInterval(function () {
                    var EIMS_C_10010_1_showimg_img_width = parseInt($("#EIMS_C_10010_1_showimg img").eq(i).css("width"));
                    $("#EIMS_C_10010_1_showimg_div").css("margin-left", parseInt(EIMS_C_10010_1_showimg_img_width) - (i + 1) * parseInt(EIMS_C_10010_1_showimg_img_width));
                    $("#EIMS_C_10010_1_showimg_fade").css('display', "none");
                    clearInterval(EIMS_C_10010_1_showimg_img);
                }, 500);
            }

            /*图片点击事件*/
            $("#EIMS_C_10010_1_sImgList  img").each(function (i) {
                $("#EIMS_C_10010_1_sImgList  img").eq(i).click(function () {
                    switch (EIMS_C_10010_1_imgStyle) {
                        case 1:
                            //$("#EIMS_C_10010_1_sImgList  li").eq(i).addClass("no").siblings().removeClass("no");
                            // $("#EIMS_C_10010_1_showimg_fade").css('display', "block");

                            $("#EIMS_C_10010_1_showimg_fade").fadeIn("slow");
                            EIMS_C_10010_1_imgStyleFade(i);
                            break;
                        default:
                            break;
                    }
                });
            });

            /*滑动的坐标进行初始化*/
            var startX = 0, startY = 0;
            var movex = 0, movey = 0;
            var startXul = 0, startYul = 0;
            var movexul = 0, moveyul = 0;
            var EIMS_C_10010_1_showimg_div_left = 0;

            /*按下*/
            function touchSatrtFunc(evt) {
                try {
                    evt.preventDefault(); //阻止触摸时浏览器的缩放、滚动条滚动等
                    var touch = evt.touches[0]; //获取第一个触点
                    var x = Number(touch.pageX); //页面触点X坐标
                    var y = Number(touch.pageY); //页面触点Y坐标
                    //记录触点初始位置
                    startX = x;
                    startY = y;
                    EIMS_C_10010_1_showimg_div_left = parseInt($("#EIMS_C_10010_1_showimg_div").css("margin-left"));
                }
                catch (e) {
                }
            }

            var EIMS_C_10010_1_showimg_div = parseInt($("#EIMS_C_10010_1_showimg img").eq(0).css("width"));
            /*滑动*/
            function touchMoveFunc(evt) {
                try {
                    evt.preventDefault(); //阻止触摸时浏览器的缩放、滚动条滚动等
                    var touch = evt.touches[0]; //获取第一个触点
                    movex = Number(touch.pageX); //页面触点X坐标
                    movey = Number(touch.pageY); //页面触点Y坐标
                    var EIMS_C_10010_1_showimg_div_left_change = parseInt($("#EIMS_C_10010_1_showimg_div").css("margin-left"));

                    if (movex - startX > 50) {
                        if (parseInt(EIMS_C_10010_1_showimg_div_left_change) < 0 && (movex - startX) < parseInt(EIMS_C_10010_1_showimg_div)) {
                            $("#EIMS_C_10010_1_showimg_div").css("margin-left", parseInt(EIMS_C_10010_1_showimg_div_left_change) + 10);
                        }
                    }

                    if (movex - startX < -50) {
                        if (-(movex - startX) > -EIMS_C_10010_1_showimg_div && parseInt(EIMS_C_10010_1_showimg_div_left_change) <= 0 && (parseInt(EIMS_C_10010_1_showimg_div_left_change) + parseInt(-EIMS_C_10010_1_showimg_div)) > -$("#EIMS_C_10010_1_sImgList img").length * parseInt(EIMS_C_10010_1_showimg_div)) {
                            $("#EIMS_C_10010_1_showimg_div").css("margin-left", parseInt(EIMS_C_10010_1_showimg_div_left_change) - 10);

                        }
                    }


                }
                catch (e) {
                }
            }

            /*离开*/
            function touchEndFunc(evt) {
                try {
                    evt.preventDefault(); //阻止触摸时浏览器的缩放、滚动条滚动等

                    var but_height = 0;
                    if ($("#EIMS_C_10010_1_buttop").css("display") != "none") {
                        but_height = parseInt($("#EIMS_C_10010_1_buttop").css("height")) * 2;
                    }

                    //判断滑动方向
                    if (movex - startX > 50) {
                        if (parseInt(EIMS_C_10010_1_showimg_div_left) < 0) {
                            var EIMS_C_10010_1_showimg_div_left_remainder = parseInt(EIMS_C_10010_1_showimg_div_left) % parseInt(EIMS_C_10010_1_showimg_div);
                            $("#EIMS_C_10010_1_showimg_div").css("margin-left", parseInt(EIMS_C_10010_1_showimg_div_left) + parseInt(EIMS_C_10010_1_showimg_div) - ((parseInt(EIMS_C_10010_1_showimg_div_left) + parseInt(EIMS_C_10010_1_showimg_div)) % parseInt(EIMS_C_10010_1_showimg_div)));
                            var EIMS_C_10010_1_sImgList_li_few = -1 * (parseInt(EIMS_C_10010_1_showimg_div_left) + parseInt(EIMS_C_10010_1_showimg_div) - ((parseInt(EIMS_C_10010_1_showimg_div_left) + parseInt(EIMS_C_10010_1_showimg_div)) % parseInt(EIMS_C_10010_1_showimg_div))) / parseInt(EIMS_C_10010_1_showimg_div);
                            if (EIMS_C_10010_1_sImgList_li_few == 0) {
                                $("#EIMS_C_10010_1_sImgList  li").eq(EIMS_C_10010_1_sImgList_li_few).addClass("no").siblings().removeClass("no");
                                $("#EIMS_C_10010_1_sImgList ul").animate({ top: 0 + "px" }, 100);
                                return;
                            }
                            if (parseInt($("#EIMS_C_10010_1_sImgList ul").css("height")) > (parseInt($("#EIMS_C_10010_1_smallimg").css("height")) - (but_height))) {
                                $("#EIMS_C_10010_1_sImgList  li").eq(EIMS_C_10010_1_sImgList_li_few).addClass("no").siblings().removeClass("no");
                                if ($("#EIMS_C_10010_1_sImgList  li").eq(EIMS_C_10010_1_sImgList_li_few).offset().top > (parseInt($("#EIMS_C_10010_1_smallimg").css("height")) - (but_height)) - parseInt($("#EIMS_C_10010_1_sImgList li").css("height"))) {
                                    $("#EIMS_C_10010_1_sImgList ul").animate({ top: (($("#EIMS_C_10010_1_sImgList ul").offset().top + ((parseInt($("#EIMS_C_10010_1_smallimg").css("height")) - (but_height)) - $("#EIMS_C_10010_1_sImgList  li").eq(EIMS_C_10010_1_sImgList_li_few).offset().top)) - parseInt($("#EIMS_C_10010_1_sImgList  li").eq(EIMS_C_10010_1_sImgList_li_few).css("height"))) + "px" }, 100);
                                    return;
                                } else if ($("#EIMS_C_10010_1_sImgList  li").eq(EIMS_C_10010_1_sImgList_li_few).offset().top < 0) {
                                    $("#EIMS_C_10010_1_sImgList ul").animate({ top: ($("#EIMS_C_10010_1_sImgList ul").offset().top - ($("#EIMS_C_10010_1_sImgList ul").offset().top - $("#EIMS_C_10010_1_sImgList  li").eq(EIMS_C_10010_1_sImgList_li_few).offset().top)) + "px" }, 100);
                                    return;
                                }

                            }
                            else {
                                $("#EIMS_C_10010_1_sImgList  li").eq(EIMS_C_10010_1_sImgList_li_few).addClass("no").siblings().removeClass("no");
                            }
                            return;
                        }
                    }

                    if (movex - startX > 0) {
                        $("#EIMS_C_10010_1_showimg_div").css("margin-left", parseInt(EIMS_C_10010_1_showimg_div_left));
                        return;
                    }

                    if (movex - startX < -50) {
                        if ((parseInt(EIMS_C_10010_1_showimg_div_left) + parseInt(-EIMS_C_10010_1_showimg_div)) > -($("#EIMS_C_10010_1_sImgList img").length * parseInt(EIMS_C_10010_1_showimg_div))) {
                            $("#EIMS_C_10010_1_showimg_div").css("margin-left", parseInt(EIMS_C_10010_1_showimg_div_left) + parseInt(-EIMS_C_10010_1_showimg_div) - ((parseInt(EIMS_C_10010_1_showimg_div_left) + parseInt(EIMS_C_10010_1_showimg_div)) % parseInt(EIMS_C_10010_1_showimg_div)));
                            var EIMS_C_10010_1_sImgList_li_few = -1 * (parseInt(EIMS_C_10010_1_showimg_div_left) + parseInt(-EIMS_C_10010_1_showimg_div) - ((parseInt(EIMS_C_10010_1_showimg_div_left) + parseInt(EIMS_C_10010_1_showimg_div)) % parseInt(EIMS_C_10010_1_showimg_div))) / parseInt(EIMS_C_10010_1_showimg_div);
                            if (EIMS_C_10010_1_sImgList_li_few == 0) {
                                $("#EIMS_C_10010_1_sImgList  li").eq(EIMS_C_10010_1_sImgList_li_few).addClass("no").siblings().removeClass("no");
                                $("#EIMS_C_10010_1_sImgList ul").animate({ top: 0 + "px" }, 100);
                                return;
                            }
                            if (parseInt($("#EIMS_C_10010_1_sImgList ul").css("height")) > (parseInt($("#EIMS_C_10010_1_smallimg").css("height")) - (but_height))) {
                                $("#EIMS_C_10010_1_sImgList  li").eq(EIMS_C_10010_1_sImgList_li_few).addClass("no").siblings().removeClass("no");
                                if ($("#EIMS_C_10010_1_sImgList  li").eq(EIMS_C_10010_1_sImgList_li_few).offset().top > (parseInt($("#EIMS_C_10010_1_smallimg").css("height")) - (but_height)) - parseInt($("#EIMS_C_10010_1_sImgList li").css("height"))) {
                                    $("#EIMS_C_10010_1_sImgList ul").animate({ top: (($("#EIMS_C_10010_1_sImgList ul").offset().top + ((parseInt($("#EIMS_C_10010_1_smallimg").css("height")) - (but_height)) - $("#EIMS_C_10010_1_sImgList  li").eq(EIMS_C_10010_1_sImgList_li_few).offset().top)) - parseInt($("#EIMS_C_10010_1_sImgList  li").eq(EIMS_C_10010_1_sImgList_li_few).css("height"))) + "px" }, 100);
                                    return;
                                } else if ($("#EIMS_C_10010_1_sImgList  li").eq(EIMS_C_10010_1_sImgList_li_few).offset().top < 0) {
                                    $("#EIMS_C_10010_1_sImgList ul").animate({ top: ($("#EIMS_C_10010_1_sImgList ul").offset().top - ($("#EIMS_C_10010_1_sImgList ul").offset().top - $("#EIMS_C_10010_1_sImgList  li").eq(EIMS_C_10010_1_sImgList_li_few).offset().top)) + "px" }, 100);
                                    return;
                                }
                            }
                            else {
                                $("#EIMS_C_10010_1_sImgList  li").eq(EIMS_C_10010_1_sImgList_li_few).addClass("no").siblings().removeClass("no");
                            }
                            return;
                        }
                    }

                    if (movex - startX < 0) {
                        $("#EIMS_C_10010_1_showimg_div").css("margin-left", parseInt(EIMS_C_10010_1_showimg_div_left));
                        return;
                    }

                }
                catch (e) {
                }
            }

            //绑定手机触摸事件
            function bindEvent() {
                try {
                    document.getElementById("EIMS_C_10010_1_showimg_div").addEventListener('touchstart', touchSatrtFunc, false);
                    document.getElementById("EIMS_C_10010_1_showimg_div").addEventListener('touchmove', touchMoveFunc, false);
                    document.getElementById("EIMS_C_10010_1_showimg_div").addEventListener('touchend', touchEndFunc, false);
                }
                catch (e) {
                }
            }

            bindEvent();
        }
    }
}
catch(err){}

/*EIMS_C_10010_1 end*/

/*xn_mc_prodv_21_wrap*/
$(function () {
    if ($("#xn_mc_prodv_21_wrap").length>0) {
        var url = window.location.href;
        if(url.indexOf('?') != -1){
            var urlPara = url.split('?')[1].split('&')[0]+"";
            var oTypeId = urlPara.split('=')[1];
            var iNmuber;
            iNmuber=oTypeId.toLocaleLowerCase();
            $('.xn_mc_prodv_21_tit').removeClass("xn_mc_prodv_21_cur");
            $('.xn_mc_prodv_21_tit[index=' + iNmuber + ']').addClass("xn_mc_prodv_21_cur");
        }
    };
});
/*end_xn_mc_prodv_21_wrap*/


/*xn_mc_newsv_3_wrap*/
$(function(){
    if($("#xn_mc_newsv_3_wrap").length > 0){
        var EIMS_C_10005_2 = {
            Scroll : null,
            Timeout : null,
            MultImageSrc : "/m/pro_view_tu.aspx",
            Init : function () {
                var scrollHeight = $q("#EIMS_C_10005_2_IndexItem")[0].scrollHeight;
                var divHeight = document.body.clientHeight;
                /*- $q("header")[0].offsetHeight;*/
                EIMS_C_10005_2.Scroll = new Scroll("EIMS_C_10005_2_moveContainer", 1, document.body.clientWidth, 1, document.body.clientWidth, divHeight, false, EIMS_C_10005_2.moveBack);

                var EIMS_C_10005_2_div = $q("#EIMS_C_10005_2_IndexItem")[0];
                var preid = EIMS_C_10005_2_div.getAttribute("preid");
                var nextid = EIMS_C_10005_2_div.getAttribute("nextid");
                var moveCount = 1;

                if (!IsNullOrEmpty(preid)) {
                    var newDiv = document.createElement("div");
                    newDiv.className = "EIMS_C_10005_2_Item EIMS_C_10005_2_loading";
                    newDiv.style["width"] = document.body.clientWidth + "px";
                    newDiv.style["height"] = "200px";
                    newDiv.innerHTML = "&nbsp;";
                    $q("#EIMS_C_10005_2_moveContainer")[0].insertBefore(newDiv, EIMS_C_10005_2_div);

                    $q("#EIMS_C_10005_2_moveContainer")[0].style[EIMS_C_10005_2.Scroll.getTransform()] = "translate(-" + document.body.clientWidth + "px, 0px) scale(1)";
                    moveCount++;
                }

                if (!IsNullOrEmpty(nextid)) {
                    var newDiv = document.createElement("div");
                    newDiv.className = "EIMS_C_10005_2_Item EIMS_C_10005_2_loading";
                    newDiv.style["width"] = document.body.clientWidth + "px";
                    newDiv.style["height"] = "200px";
                    newDiv.innerHTML = "&nbsp;";
                    $q("#EIMS_C_10005_2_moveContainer")[0].appendChild(newDiv);
                    moveCount++;
                }

                if (moveCount > 1) {
                    EIMS_C_10005_2.Scroll.setMoveCount(moveCount);
                }

                window.addEventListener("resize", function () {
                    EIMS_C_10005_2.resize();
                });

                EIMS_C_10005_2.resize();
            },

            resize : function () {
                var EIMS_C_10005_2_Item = $q(".EIMS_C_10005_2_Item");
                for (var i = 0; i < EIMS_C_10005_2_Item.length; i++) {
                    EIMS_C_10005_2_Item[i].style["width"] = document.body.clientWidth + "px";
                }
                EIMS_C_10005_2.Scroll.setMovingLength(document.body.clientWidth);
            },
            moveBack : function (i, direction) {
                clearTimeout(EIMS_C_10005_2.Timeout);

                if (parseInt(direction) == 3) { //向左移动
                    var nextDiv = $q(".EIMS_C_10005_2_Item")[i];
                    if (IsNullOrEmpty(nextDiv) || nextDiv.getAttribute("loaded") == "1") {
                        return;
                    }

                    var curDiv = $q(".EIMS_C_10005_2_Item")[i - 1];
                    var cId = curDiv.getAttribute("nextId");
                    var url = curDiv.getAttribute("url");

                    if (IsNullOrEmpty(cId)) {
                        return;
                    }

                    url = MergeUrlParas(url, false, ["Id"], [cId]);
                    var ajax = new Ajax();
                    ajax.getData(url, "EIMS_C_10005_2_IndexItem", function (data, script) {
                        if (IsNullOrEmpty(data)) {
                            return;
                        }

                        var s = document.createElement("span");
                        s.innerHTML = data;
                        var r = s.querySelectorAll("#EIMS_C_10005_2_IndexItem")[0];
                        nextDiv.innerHTML = r.innerHTML;

                        nextDiv.className = "EIMS_C_10005_2_Item";
                        nextDiv.style["height"] = "";
                        nextDiv.setAttribute("loaded", "1");
                        var nextId = r.getAttribute("nextid");
                        nextDiv.setAttribute("nextId", nextId);


                        var iframe = nextDiv.querySelectorAll("iframe");
                        if (iframe && iframe.length > 0) {
                            iframe[0].src = MergeUrlParas(EIMS_C_10005_2.MultImageSrc, false, ["Id"], [cId]);
                        }

                        ReLoadImage(nextDiv);

                        if (!IsNullOrEmpty(nextId)) {
                            var newDiv = document.createElement("div");

                            newDiv.className = "EIMS_C_10005_2_Item EIMS_C_10005_2_loading";
                            newDiv.style["width"] = document.body.clientWidth + "px";
                            newDiv.style["height"] = "200px";
                            $q("#EIMS_C_10005_2_moveContainer")[0].appendChild(newDiv);

                            EIMS_C_10005_2.Scroll.setMoveCount(EIMS_C_10005_2.Scroll.getMoveCount() + 1);
                        }

                    }, false);
                }

                if (parseInt(direction) == 4) { //向右移动
                    if (i > 0) {
                        return;
                    }

                    var preDiv = $q(".EIMS_C_10005_2_Item")[i];
                    if (IsNullOrEmpty(preDiv) || preDiv.getAttribute("loaded") == "1") {
                        return;
                    }

                    var curDiv = $q(".EIMS_C_10005_2_Item")[i + 1];
                    var cId = curDiv.getAttribute("preid");
                    var url = curDiv.getAttribute("url");

                    if (IsNullOrEmpty(cId)) {
                        return;
                    }

                    url = MergeUrlParas(url, false, ["Id"], [cId]);

                    var ajax = new Ajax();
                    ajax.getData(url, "EIMS_C_10005_2_IndexItem", function (data, script) {
                        if (IsNullOrEmpty(data)) {
                            return;
                        }

                        var s = document.createElement("span");
                        s.innerHTML = data;
                        var r = s.querySelectorAll("#EIMS_C_10005_2_IndexItem")[0];
                        preDiv.innerHTML = r.innerHTML;
                        var preid = r.getAttribute("preid");

                        preDiv.className = "EIMS_C_10005_2_Item";
                        preDiv.style["Height"] = "";
                        preDiv.setAttribute("loaded", "1");
                        preDiv.setAttribute("preid", preid);

                        var iframe = preDiv.querySelectorAll("iframe");
                        if (iframe && iframe.length > 0) {
                            iframe[0].src = MergeUrlParas(EIMS_C_10005_2.MultImageSrc, false, ["Id"], [cId]);
                        }

                        ReLoadImage(preDiv);

                        if (IsNullOrEmpty(preid)) {
                            return;
                        }

                        EIMS_C_10005_2.Timeout = setTimeout(function () {
                            var newDiv = document.createElement("div");

                            newDiv.className = "EIMS_C_10005_2_Item EIMS_C_10005_2_loading";
                            newDiv.style["width"] = document.body.clientWidth + "px";
                            newDiv.style["Height"] = "200px";
                            newDiv.innerHTML = "&nbsp;";
                            $q("#EIMS_C_10005_2_moveContainer")[0].insertBefore(newDiv, preDiv);
                            EIMS_C_10005_2.Scroll.setMoveCount(EIMS_C_10005_2.Scroll.getMoveCount() + 1);

                            var tf = $q("#EIMS_C_10005_2_moveContainer")[0].style[EIMS_C_10005_2.Scroll.getTransform()];
                            var x = 0;
                            if (tf != "") {
                                var position = tf.split('(')[1].split(',');
                                x = parseInt(position[0]);
                            }

                            $q("#EIMS_C_10005_2_moveContainer")[0].style[EIMS_C_10005_2.Scroll.getTransform()] = "translate(" + (x - document.body.clientWidth) + "px, 0px) scale(1)";
                        }, 800);

                    }, false);
                }
            }
        }
        try {
            var div = $q(".EIMS_C_10005_2_IndexItem")[0];
            var iframe = div.querySelectorAll("iframe");
            if (iframe && iframe.length > 0) {
                var id = QueryString("Id");
                iframe[0].src = MergeUrlParas(EIMS_C_10005_2.MultImageSrc, false, ["Id"], [id]);
            }
        } catch (err) {}

        EIMS_C_10005_2.Init();
    }

});
/*end_xn_mc_newsv_3_wrap*/

/*xn_mc_feedback_1_wrap*/
/*-------2015-07-01修改取消留言-------*/
$(function(){
    try {
        if ($("#EIMS_C_10002_2_Main").length > 0) {
            EIMS_C_10002_2.Init();
        }
    } catch (err) { }
});

var EIMS_C_10002_2 = {


    Init: function () {
        $("#EIMS_C_10002_2_Params").val(para);
    },

    createMsgDiv: function () { //弹出一个div层
        var temp = $(".EIMS_C_10002_2_ui-btn")[0];
        if ($("#EIMS_C_10002_2_Type_ddl").length > 0) {
            var listDiv = document.createElement("DIV");
            listDiv.id = "EIMS_C_10002_2_MsgTypeList_div";
            listDiv.style.position = "absolute";
            listDiv.style.width = document.body.scrollWidth;
            listDiv.style.height = document.documentElement.offsetHeight;
            listDiv.style.zIndex = '1';
            listDiv.style.top = ($(".EIMS_C_10002_2_ui-btn").height() + $(".EIMS_C_10002_2_ui-btn").offset().top + 1) + "px";
            //listDiv.style.left=temp.style.offsetLeft+"px";
            listDiv.style.width = temp.offsetWidth + "px";

            listDiv.style.backgroundColor = "#D7D7D7";

            //listDiv.style.opacity='0.5';
            //listDiv.style.filter="alpha(opacity=80)";
            listDiv.style.opacity = '0.9';


            var msgListDdl = $("#EIMS_C_10002_2_Type_ddl")[0];
            var innerHtml = "<ul style='list-style:none;cursor:pointer;'>";
            for (var i = 0; i < msgListDdl.children.length; i++) {
                innerHtml += "<li onmousemove='this.style.backgroundColor=\"#4b6c9e\";' onmouseout='this.style.backgroundColor=\"\";' onclick='EIMS_C_10002_2.selectMsgType(this)' value='" + msgListDdl.children[i].value + "'>" + msgListDdl.children[i].innerHTML + "</li>";
            }
            innerHtml += "</ul>";

            listDiv.innerHTML = innerHtml;
            document.body.appendChild(listDiv);
        }
    },
    selectMsgType: function (obj) { //选择留言类型
        $("#EIMS_C_10002_2_Type_ddl").val(obj.value);
        if (obj.value > 0) {
            $(".EIMS_C_10002_2_ui-btn-text").html(obj.innerHTML);
        } else {
            $(".EIMS_C_10002_2_ui-btn-text").html("请选择留言类型");
        }

        alert($('#EIMS_C_10002_2_MsgTypeList_div'));

        //关闭弹出的div层
        $('#EIMS_C_10002_2_MsgTypeList_div').remove();
    },

    CheckMsgInfo: function () { //验证留言提交字段
        if ($("#EIMS_C_10002_2_Type_ddl").length > 0) {
            var msgType = $("#EIMS_C_10002_2_Type_ddl"); //留言类型
            if (msgType.val() <= 0) {
                alert('请选择留言类型！');
                return false;
            }
        }

        if ($("#EIMS_C_10002_2_AuthorName_Div").length > 0) {
            var msgAuthorName = $("#EIMS_C_10002_2_AuthorName"); //联系人
            if (msgAuthorName.val() == "联系人" || msgAuthorName.val() == "") {
                alert("请输入联系人姓名！");
                msgAuthorName.focus();
                return false;
            }
        }

        if ($("#EIMS_C_10002_2_CompanyName").length > 0) {
            var msgCompany = $("#EIMS_C_10002_2_CompanyName"); //公司名称
            if (msgCompany.val() == "公司名称" || msgCompany.val() == "") {
                alert("请输入公司名称！");
                return false;
            }
        }

        if ($("#EIMS_C_10002_2_Telephone_Div").length > 0) {
            var isMobile = /^1[3-8]{1}\d{9}$/;
            var isNumber = /^[0-9]*$/;  //11位数
            var isNum = /^[0-9]*[1-9][0-9]*$/; //自然数
            var isLetter=/[^0-9.]/g;

            var msgMobile = $("#EIMS_C_10002_2_Telephone"); //用户手机号
            if (msgMobile.val() == "联系人手机" || msgMobile.val() == "") {
                alert("请输入联系人手机！");
                return false;
            }

            if (isLetter.test(msgMobile.val())) {
                alert("请输入正确的手机号码！");
                return false;
            }

            if (isNum.test(msgMobile.val())) {
                if (!isNumber.test(msgMobile.val())) {
                    alert("手机号码应为11位数字，以13/14/15/17/18开头！");
                    return false;
                }

                if (!isMobile.test(msgMobile.val())) {
                    alert("手机号码格式不正确，请重新输入！");
                    return false;
                }
            }
        }

        if ($("#EIMS_C_10002_2_Email_Div").length > 0) {
            var isEmail = /^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/;

            var msgEmail = $("#EIMS_C_10002_2_Email");
            if (msgEmail.val() == "Email" || msgEmail.val() == "") {
                alert("请输入联系人邮箱！");
                return false;
            }

            if (!isEmail.test(msgEmail.val())) {
                alert("邮箱格式不正确，请重新输入！");
                return false;
            }
        }

        if ($("#EIMS_C_10002_2_MsgContent").length > 0) {
            var msgContent = $("#EIMS_C_10002_2_MsgContent"); //留言内容
            if (msgContent.val() == "请输入留言内容..." || msgContent.val() == "") {
                alert('请输入留言内容！');
                return false;
            }
        }

        return true;
    },



    SubmitAdvisorys: function () {
        //提交验证
        if (!EIMS_C_10002_2.CheckMsgInfo()) {
            return false;
        }

        var Params = null;
        if (para == null) {
            alert("无效的参数！");
            return false;
        }

        if (para.indexOf(",") < 0) {
            return false;
        }

        var paras = para.split(',');
        var typeid = paras[0];
        var device = paras[1];
        var content = "";

        var magContent = $("#EIMS_C_10002_2_MsgContent").val();
        var company = $("#EIMS_C_10002_2_CompanyName").val();
        var authorName = $("#EIMS_C_10002_2_AuthorName").val();
        var email = $("#EIMS_C_10002_2_Email").val();
        var mobile = $("#EIMS_C_10002_2_Telephone").val();

        var content = "<Submit>\
                            <Content>" + magContent + "</Content>\
                            <Company>" + company + "</Company>\
                            <AuthorName>" + authorName + "</AuthorName>\
                            <Email>" + email + "</Email>\
                            <Mobile>" + mobile + "</Mobile>\
                      </Submit>";

        Params = { "TypeId": typeid, "Device": device, "content": content };

        AjaxMethod("Common", "SubmitAdvisorys", Params, function (data) {
            if (IsNullOrEmpty(data)) {
                return;
            }

            if (data.result != 1) {
                return;
            }

            alert("提交留言成功！");
            document.location.reload();
        });

    },

    CancelMsg: function () {	//取消留言
        $("#EIMS_C_10002_2_MsgContent").val("");
        $("#EIMS_C_10002_2_CompanyName").val("");
        $("#EIMS_C_10002_2_AuthorName").val("");
        $("#EIMS_C_10002_2_Telephone").val("");
        $("#EIMS_C_10002_2_Email").val("");
    }
}
/*end_xn_mc_feedback_1_wrap*/

/*xn_mc_contact_2_wrap*/
$(function(){
    try {
        if ($("#EIMS_C_10002_3_Main").length > 0) {
            EIMS_C_10002_3.Init();
        }
    } catch (err) { }
});

var EIMS_C_10002_3 = {

    Init: function () {
        $("#EIMS_C_10002_3_Params").val(para);
    },

    createMsgDiv: function () { //弹出一个div层
        var temp = $(".EIMS_C_10002_3_ui-btn")[0];
        if ($("#EIMS_C_10002_3_Type_ddl").length > 0) {
            var listDiv = document.createElement("DIV");
            listDiv.id = "EIMS_C_10002_3_MsgTypeList_div";
            listDiv.style.position = "absolute";
            listDiv.style.width = document.body.scrollWidth;
            listDiv.style.height = document.documentElement.offsetHeight;
            listDiv.style.zIndex = '1';
            listDiv.style.top = ($(".EIMS_C_10002_3_ui-btn").height() + $(".EIMS_C_10002_3_ui-btn").offset().top + 1) + "px";
            //listDiv.style.left=temp.style.offsetLeft+"px";
            listDiv.style.width = temp.offsetWidth + "px";

            listDiv.style.backgroundColor = "#D7D7D7";

            //listDiv.style.opacity='0.5';
            //listDiv.style.filter="alpha(opacity=80)";
            listDiv.style.opacity = '0.9';


            var msgListDdl = $("#EIMS_C_10002_3_Type_ddl")[0];
            var innerHtml = "<ul style='list-style:none;cursor:pointer;'>";
            for (var i = 0; i < msgListDdl.children.length; i++) {
                innerHtml += "<li onmousemove='this.style.backgroundColor=\"#4b6c9e\";' onmouseout='this.style.backgroundColor=\"\";' onclick='EIMS_C_10002_3.selectMsgType(this)' value='" + msgListDdl.children[i].value + "'>" + msgListDdl.children[i].innerHTML + "</li>";
            }
            innerHtml += "</ul>";

            listDiv.innerHTML = innerHtml;
            document.body.appendChild(listDiv);
        }
    },
    selectMsgType: function (obj) { //选择留言类型
        $("#EIMS_C_10002_3_Type_ddl").val(obj.value);
        if (obj.value > 0) {
            $(".EIMS_C_10002_3_ui-btn-text").html(obj.innerHTML);
        } else {
            $(".EIMS_C_10002_3_ui-btn-text").html("请选择留言类型");
        }

        alert($('#EIMS_C_10002_3_MsgTypeList_div'));

        //关闭弹出的div层
        $('#EIMS_C_10002_3_MsgTypeList_div').remove();
    },

    CheckMsgInfo: function () { //验证留言提交字段
        if ($("#EIMS_C_10002_3_Type_ddl").length > 0) {
            var msgType = $("#EIMS_C_10002_3_Type_ddl"); //留言类型
            if (msgType.val() <= 0) {
                alert('请选择留言类型！');
                return false;
            }
        }

        if ($("#EIMS_C_10002_3_MsgContent").length > 0) {
            var msgContent = $("#EIMS_C_10002_3_MsgContent"); //留言内容
            if (msgContent.val() == "请输入留言内容..." || msgContent.val() == "") {
                alert('请输入留言内容！');
                return false;
            }
        }

        if ($("#EIMS_C_10002_3_CompanyName").length > 0) {
            var msgCompany = $("#EIMS_C_10002_3_CompanyName"); //公司名称
            if (msgCompany.val() == "公司名称" || msgCompany.val() == "") {
                alert("请输入公司名称！");
                return false;
            }
        }

        if ($("#EIMS_C_10002_3_AuthorName_Div").length > 0) {
            var msgAuthorName = $("#EIMS_C_10002_3_AuthorName"); //联系人
            if (msgAuthorName.val() == "联系人" || msgAuthorName.val() == "") {
                alert("请输入联系人姓名！");
                msgAuthorName.focus();
                return false;
            }
        }

        if ($("#EIMS_C_10002_3_Telephone_Div").length > 0) {
            var isMobile = /^1[3-8]{1}\d{9}$/;
            var isNumber = /^[0-9]*$/;  //11位数
            var isNum = /^[0-9]*[1-9][0-9]*$/; //自然数
            var isLetter=/[^0-9.]/g;

            var msgMobile = $("#EIMS_C_10002_3_Telephone"); //用户手机号
            if (msgMobile.val() == "联系人手机" || msgMobile.val() == "") {
                alert("请输入联系人手机！");
                return false;
            }

            if (isLetter.test(msgMobile.val())) {
                alert("请输入正确的手机号码！");
                return false;
            }

            if (isNum.test(msgMobile.val())) {
                if (!isNumber.test(msgMobile.val())) {
                    alert("手机号码应为11位数字，以13/14/15/17/18开头！");
                    return false;
                }

                if (!isMobile.test(msgMobile.val())) {
                    alert("手机号码格式不正确，请重新输入！");
                    return false;
                }
            }
        }

        if ($("#EIMS_C_10002_3_Email_Div").length > 0) {
            var isEmail = /^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/;

            var msgEmail = $("#EIMS_C_10002_3_Email");
            if (msgEmail.val() == "Email" || msgEmail.val() == "") {
                alert("请输入联系人邮箱！");
                return false;
            }

            if (!isEmail.test(msgEmail.val())) {
                alert("邮箱格式不正确，请重新输入！");
                return false;
            }
        }

        return true;
    },



    SubmitAdvisorys: function () {
        //提交验证
        if (!EIMS_C_10002_3.CheckMsgInfo()) {
            return false;
        }

        var Params = null;
        if (para == null) {
            alert("无效的参数！");
            return false;
        }

        if (para.indexOf(",") < 0) {
            return false;
        }

        var paras = para.split(',');
        var typeid = paras[0];
        var device = paras[1];
        var content = "";

        var magContent = $("#EIMS_C_10002_3_MsgContent").val();
        var company = $("#EIMS_C_10002_3_CompanyName").val();
        var authorName = $("#EIMS_C_10002_3_AuthorName").val();
        var email = $("#EIMS_C_10002_3_Email").val();
        var mobile = $("#EIMS_C_10002_3_Telephone").val();

        var content = "<Submit>\
                            <Content>" + magContent + "</Content>\
                            <Company>" + company + "</Company>\
                            <AuthorName>" + authorName + "</AuthorName>\
                            <Email>" + email + "</Email>\
                            <Mobile>" + mobile + "</Mobile>\
                      </Submit>";

        Params = { "TypeId": typeid, "Device": device, "content": content };

        AjaxMethod("Common", "SubmitAdvisorys", Params, function (data) {
            if (IsNullOrEmpty(data)) {
                return;
            }

            if (data.result != 1) {
                return;
            }

            alert("提交留言成功！");
            // document.location.reload();
        });

    },

    CancelMsg: function () {	//取消留言
        $("#EIMS_C_10002_3_MsgContent").val("请输入留言内容...");
        $("#EIMS_C_10002_3_CompanyName").val("公司名称");
        $("#EIMS_C_10002_3_AuthorName").val("联系人");
        $("#EIMS_C_10002_3_Telephone").val("联系电话");
        $("#EIMS_C_10002_3_Email").val("Email");
    }
}
/*end_xn_mc_contact_2_wrap*/


/*xn_mc_contact_3_wrap*/
$(function(){
    try {
        if ($("#EIMS_C_10002_4_Main").length > 0) {
            EIMS_C_10002_4.Init();
        }
    } catch (err) { }
});

var EIMS_C_10002_4 = {

    Init: function () {
        $("#EIMS_C_10002_4_Params").val(para);
    },

    createMsgDiv: function () { //弹出一个div层
        var temp = $(".EIMS_C_10002_4_ui-btn")[0];
        if ($("#EIMS_C_10002_4_Type_ddl").length > 0) {
            var listDiv = document.createElement("DIV");
            listDiv.id = "EIMS_C_10002_4_MsgTypeList_div";
            listDiv.style.position = "absolute";
            listDiv.style.width = document.body.scrollWidth;
            listDiv.style.height = document.documentElement.offsetHeight;
            listDiv.style.zIndex = '1';
            listDiv.style.top = ($(".EIMS_C_10002_4_ui-btn").height() + $(".EIMS_C_10002_4_ui-btn").offset().top + 1) + "px";
            //listDiv.style.left=temp.style.offsetLeft+"px";
            listDiv.style.width = temp.offsetWidth + "px";

            listDiv.style.backgroundColor = "#D7D7D7";

            //listDiv.style.opacity='0.5';
            //listDiv.style.filter="alpha(opacity=80)";
            listDiv.style.opacity = '0.9';


            var msgListDdl = $("#EIMS_C_10002_4_Type_ddl")[0];
            var innerHtml = "<ul style='list-style:none;cursor:pointer;'>";
            for (var i = 0; i < msgListDdl.children.length; i++) {
                innerHtml += "<li onmousemove='this.style.backgroundColor=\"#4b6c9e\";' onmouseout='this.style.backgroundColor=\"\";' onclick='EIMS_C_10002_4.selectMsgType(this)' value='" + msgListDdl.children[i].value + "'>" + msgListDdl.children[i].innerHTML + "</li>";
            }
            innerHtml += "</ul>";

            listDiv.innerHTML = innerHtml;
            document.body.appendChild(listDiv);
        }
    },
    selectMsgType: function (obj) { //选择留言类型
        $("#EIMS_C_10002_4_Type_ddl").val(obj.value);
        if (obj.value > 0) {
            $(".EIMS_C_10002_4_ui-btn-text").html(obj.innerHTML);
        } else {
            $(".EIMS_C_10002_4_ui-btn-text").html("请选择留言类型");
        }

        alert($('#EIMS_C_10002_4_MsgTypeList_div'));

        //关闭弹出的div层
        $('#EIMS_C_10002_4_MsgTypeList_div').remove();
    },

    CheckMsgInfo: function () { //验证留言提交字段
        if ($("#EIMS_C_10002_4_Type_ddl").length > 0) {
            var msgType = $("#EIMS_C_10002_4_Type_ddl"); //留言类型
            if (msgType.val() <= 0) {
                alert('请选择留言类型！');
                return false;
            }
        }

        if ($("#EIMS_C_10002_4_MsgContent").length > 0) {
            var msgContent = $("#EIMS_C_10002_4_MsgContent"); //留言内容
            if (msgContent.val() == "请输入留言内容..." || msgContent.val() == "") {
                alert('请输入留言内容！');
                return false;
            }
        }

        if ($("#EIMS_C_10002_4_CompanyName").length > 0) {
            var msgCompany = $("#EIMS_C_10002_4_CompanyName"); //公司名称
            if (msgCompany.val() == "公司名称" || msgCompany.val() == "") {
                alert("请输入公司名称！");
                return false;
            }
        }

        if ($("#EIMS_C_10002_4_AuthorName_Div").length > 0) {
            var msgAuthorName = $("#EIMS_C_10002_4_AuthorName"); //联系人
            if (msgAuthorName.val() == "联系人" || msgAuthorName.val() == "") {
                alert("请输入联系人姓名！");
                msgAuthorName.focus();
                return false;
            }
        }

        if ($("#EIMS_C_10002_4_Telephone_Div").length > 0) {
            var isMobile = /^1[3-8]{1}\d{9}$/;
            var isNumber = /^[0-9]*$/;  //11位数
            var isNum = /^[0-9]*[1-9][0-9]*$/; //自然数
            var isLetter=/[^0-9.]/g;

            var msgMobile = $("#EIMS_C_10002_4_Telephone"); //用户手机号
            if (msgMobile.val() == "联系人手机" || msgMobile.val() == "") {
                alert("请输入联系人手机！");
                return false;
            }

            if (isLetter.test(msgMobile.val())) {
                alert("请输入正确的手机号码！");
                return false;
            }

            if (isNum.test(msgMobile.val())) {
                if (!isNumber.test(msgMobile.val())) {
                    alert("手机号码应为11位数字，以13/14/15/17/18开头！");
                    return false;
                }

                if (!isMobile.test(msgMobile.val())) {
                    alert("手机号码格式不正确，请重新输入！");
                    return false;
                }
            }
        }

        if ($("#EIMS_C_10002_4_Email_Div").length > 0) {
            var isEmail = /^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/;

            var msgEmail = $("#EIMS_C_10002_4_Email");
            if (msgEmail.val() == "Email" || msgEmail.val() == "") {
                alert("请输入联系人邮箱！");
                return false;
            }

            if (!isEmail.test(msgEmail.val())) {
                alert("邮箱格式不正确，请重新输入！");
                return false;
            }
        }

        return true;
    },



    SubmitAdvisorys: function () {
        //提交验证
        if (!EIMS_C_10002_4.CheckMsgInfo()) {
            return false;
        }

        var Params = null;
        if (para == null) {
            alert("无效的参数！");
            return false;
        }

        if (para.indexOf(",") < 0) {
            return false;
        }

        var paras = para.split(',');
        var typeid = paras[0];
        var device = paras[1];
        var content = "";

        var magContent = $("#EIMS_C_10002_4_MsgContent").val();
        var company = $("#EIMS_C_10002_4_CompanyName").val();
        var authorName = $("#EIMS_C_10002_4_AuthorName").val();
        var email = $("#EIMS_C_10002_4_Email").val();
        var mobile = $("#EIMS_C_10002_4_Telephone").val();

        var content = "<Submit>\
                            <Content>" + magContent + "</Content>\
                            <Company>" + company + "</Company>\
                            <AuthorName>" + authorName + "</AuthorName>\
                            <Email>" + email + "</Email>\
                            <Mobile>" + mobile + "</Mobile>\
                      </Submit>";

        Params = { "TypeId": typeid, "Device": device, "content": content };

        AjaxMethod("Common", "SubmitAdvisorys", Params, function (data) {
            if (IsNullOrEmpty(data)) {
                return;
            }

            if (data.result != 1) {
                return;
            }

            alert("提交留言成功！");
            // document.location.reload();
        });

    },

    CancelMsg: function () {    //取消留言
        $("#EIMS_C_10002_4_MsgContent").val("请输入留言内容...");
        $("#EIMS_C_10002_4_CompanyName").val("公司名称");
        $("#EIMS_C_10002_4_AuthorName").val("联系人");
        $("#EIMS_C_10002_4_Telephone").val("联系电话");
        $("#EIMS_C_10002_4_Email").val("Email");
    }
}

//切换效果
$(function(){
    var tUl=$(".xn_mc_contact_3_tUl");
    var tLi=tUl.children("li");
    var cWrap=$(".xn_mc_contact_3_cWrap");
    var cUl=$(".xn_mc_contact_3_cUl");
    var cLi=cUl.children("li");
    var idx=1;
    var lWidth=cWrap.outerWidth(true);
    var cWidth=0;
    var speed=200;
    var currClass="xn_mc_contact_3_tLi_curr";

    cLi.css({
        "float":"left",
        "width":lWidth,
    });

    cLi.each(function(){
        cWidth=cWidth+lWidth;
    })
    cUl.css({
        "width":cWidth,
        "overflow":"hidden",
        "position":"relative",
        "left":"0px",
        "height":cLi.eq(0).outerHeight(true)+"px",
    });

    tLi.first().addClass(currClass);
    tLi.on("click",function(){
        var _this=$(this);
        idx=_this.index()+1;
        _this.addClass(currClass).siblings().removeClass(currClass);
        cUl.animate({
            "left":-(lWidth*_this.index())+"px",
            "height":cLi.eq(_this.index()).outerHeight(true)
        },speed);
    })

    //左右切换：
    function nextImg(){
        if(idx < cLi.length){
            cUl.stop().animate({"left":"-"+cLi.outerWidth(true)*idx,"height":cLi.eq(idx).outerHeight(true)},speed);
            tLi.eq(idx).addClass(currClass).siblings().removeClass(currClass);
            idx++;
        }else{
            cUl.stop().animate({"left":"-"+cLi.outerWidth(true)*(cLi.length-1) - 100 +"px"},speed/cLi.length);
            cUl.animate({"left":"-"+cLi.outerWidth(true)*(cLi.length-1)},speed/cLi.length);
        }
    }

    function prevImg(){
        if(idx > 1){
            idx--;
            cUl.stop().animate({"left":"-"+cLi.outerWidth(true)*(idx-1),"height":cLi.eq(idx-1).outerHeight(true)});
            tLi.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
        }else{

            cUl.stop().animate({"left":100+"px"},speed/cLi.length);
            cUl.animate({"left":0},speed/cLi.length);
        }
    }

    //拖动效果
    var dragDistance =100 ;
    var oCon_HammerOne=HammerOne(cUl);//类别说明-图片
    oCon_HammerOne.on('dragend',function(ev){
        ev.preventDefault();
        switch(ev.type){
            case "dragend":
                if(ev.gesture.deltaX < 0 ){
                    if(ev.gesture.deltaX < -dragDistance ){
                        nextImg();
                    }else{}
                }
                if(ev.gesture.deltaX > 0){
                    if(ev.gesture.deltaX > dragDistance ){
                        prevImg();
                    }else{}
                }
                break;
            default:
        }
    });

})
/*end_xn_mc_contact_3_wrap*/


/*banner*/
$(function(){
    if($(".EIMS_C_10004_1Img").length > 0){
        /* EIMS_C_10004_1 start 2014/05/07 */
        var EIMS_C_10004_1 = {
            Init: function(){
                var firstImages = $q(".EIMS_C_10004_1Img")[0].querySelectorAll("img");
                for(var iIndex=0;iIndex<firstImages.length;iIndex++){
                    firstImages[iIndex].onload = function() {
                        var percent = this.naturalHeight / this.naturalWidth;

                        var imgs = $q(".EIMS_C_10004_1Img");
                        for (var i = 0; i < imgs.length; i++) {
                            imgs[i].style["maxHeight"] = (document.body.clientWidth * percent) + "px";
                            imgs[i].querySelector("img").style.height = (document.body.clientWidth * percent) + "px";
                        }
                    }

                    firstImages[iIndex].setAttribute("src",firstImages[iIndex].getAttribute("loadsrc"));
                }

                $q(".EIMS_C_10004_1Img")[0].className = "EIMS_C_10004_1Img";

                window.EIMS_C_10004_1Scroll1 = new Scroll("EIMS_C_10004_1Move", 1, document.body.clientWidth, $q("#EIMS_C_10004_1Container li").length, document.body.clientWidth, 0, false, function(i){
                    setTimeout(function(){
                        if (li.length <= i) {
                            i = li.length - 1;
                        }
                        var div = $q(".EIMS_C_10004_1Img")[i];
                        div.className = "EIMS_C_10004_1Img";
                        div.setAttribute("loaded", "1");

                        var imgs = div.querySelectorAll("img");
                        for (var x = 0; x <imgs.length; x++) {
                            if (imgs[x].src == "") {
                                imgs[x].src = imgs[x].getAttribute("loadsrc");
                            }
                        }
                    }, 100);

                    var imgs = $q(".EIMS_C_10004_1Img");
                    for (var j = 0;j < imgs.length; j++) {
                        imgs[j].className = "EIMS_C_10004_1Img";
                    }

                    var li = $q("#EIMS_C_10004_1Container li");
                    if (li ==  null || li.length <= 0) {
                        return;
                    }

                    for (var j = 0; j < li.length; j++) {
                        li[j].className = "EIMS_C_10004_1Default";
                    }

                    if (li.length <= i) {
                        i = li.length - 1;
                    }
                    li[i].className = "EIMS_C_10004_1Active";
                });

                window.EIMS_C_10004_1GoType = function(obj) {
                    var index = parseInt(obj.getAttribute("index"));
                    EIMS_C_10004_1Scroll1.goPage(index);
                };

                window.EIMS_C_10004_1Resize = function(){
                    var imgs = $q(".EIMS_C_10004_1Img");
                    var li = $q("#EIMS_C_10004_1Container li");
                    EIMS_C_10004_1Scroll1.setMovingLength(document.body.clientWidth);

                    for (var i = 0; i < imgs.length; i++) {
                        var img = imgs[i].querySelector("img")
                        var percent = img.naturalHeight / img.naturalWidth;
                        imgs[i].style["maxWidth"] = document.body.clientWidth + "px";

                        if (!isNaN(percent)) {
                            imgs[i].style["maxHeight"] = (document.body.clientWidth * percent) + "px";
                            img.style["height"] = "auto"; //(document.body.clientWidth * percent) + "px";
                        }
                    }
                };

                window.addEventListener("resize", function(){
                    EIMS_C_10004_1Resize();
                });

                EIMS_C_10004_1Resize();
            }
        }
        /* EIMS_C_10004_1 end */
        EIMS_C_10004_1.Init();
        var id = QueryString("Id");
    }
});
$(function(){
    var $max = $(".EIMS_C_10004_1Img").first().css("maxWidth");
    $(".EIMS_C_10004_1Img img").css('width',$max);
})
/*end_banner*/

/*xn_mc_casev_1_warp*/
var EIMS_C_10005_1 = {
    Scroll: null,
    Timeout: null,
    Config:{
        MultImageSrc: "/m/pro_view_tu.aspx",
        NoRulePage:"/m/lose.aspx",//无权限提示页面名称
        RulePageContentID:"content",//过滤限页面内容的ID
        RowIds:""//行ID串
    },

    Init : function () {
        EIMS_C_10005_1.Config.RowIds = "," + EIMS_C_10005_1_PIds + ",";

        var cId = QueryString("Id");
        var id = "," + cId + ",";
        var nextid, preid, str;
        var firstDiv = $q("#EIMS_C_10005_1_IndexItem")[0];

        var startIndex = EIMS_C_10005_1.Config.RowIds.indexOf(id);
        if (startIndex >= 0) {
            str = EIMS_C_10005_1.Config.RowIds.substr(startIndex + id.length);
            nextid = str.substr(0,str.indexOf(","));
        }
        firstDiv.setAttribute("nextId", nextid);

        startIndex = EIMS_C_10005_1.Config.RowIds.indexOf(id);
        if (startIndex >= 0) {
            str = EIMS_C_10005_1.Config.RowIds.substr(0,startIndex);
            preid = str.substr(str.lastIndexOf(",") + 1);
        }
        firstDiv.setAttribute("preid", preid);

        var scrollHeight = firstDiv.scrollHeight;
        var divHeight = document.body.clientHeight;
        /*- $q("header")[0].offsetHeight;*/
        EIMS_C_10005_1.Scroll = new Scroll("EIMS_C_10005_1_moveContainer", 1, document.body.clientWidth, 1, document.body.clientWidth, divHeight, false, EIMS_C_10005_1.moveBack);

        //var preid = firstDiv.getAttribute("preid");
        //var nextid = firstDiv.getAttribute("nextid");
        var moveCount = 1;

        if (!IsNullOrEmpty(preid)) {
            var newDiv = document.createElement("div");
            newDiv.className = "EIMS_C_10005_1_Item EIMS_C_10005_1_loading";
            newDiv.style["width"] = document.body.clientWidth + "px";
            newDiv.style["height"] = "auto";
            newDiv.innerHTML = "&nbsp;";
            $q("#EIMS_C_10005_1_moveContainer")[0].insertBefore(newDiv, firstDiv);

            $q("#EIMS_C_10005_1_moveContainer")[0].style[EIMS_C_10005_1.Scroll.getTransform()] = "translate(-" + document.body.clientWidth + "px, 0px) scale(1)";
            moveCount++;
        }

        if (!IsNullOrEmpty(nextid)) {
            var newDiv = document.createElement("div");
            newDiv.className = "EIMS_C_10005_1_Item EIMS_C_10005_1_loading";
            newDiv.style["width"] = document.body.clientWidth + "px";
            newDiv.style["height"] = "auto";
            newDiv.innerHTML = "&nbsp;";
            $q("#EIMS_C_10005_1_moveContainer")[0].appendChild(newDiv);
            moveCount++;
        }

        if (moveCount>1) {
            EIMS_C_10005_1.Scroll.setMoveCount(moveCount);
        }

        window.addEventListener("resize", function () {
            EIMS_C_10005_1.resize();
        });

        EIMS_C_10005_1.resize();
    },

    resize : function () {
        var EIMS_C_10005_1_Item = $q(".EIMS_C_10005_1_Item");
        for (var i = 0; i < EIMS_C_10005_1_Item.length; i++) {
            EIMS_C_10005_1_Item[i].style["width"] = document.body.clientWidth + "px";
        }
        EIMS_C_10005_1.Scroll.setMovingLength(document.body.clientWidth);
    },
    moveBack : function (i, direction) {
        clearTimeout(EIMS_C_10005_1.Timeout);

        if (parseInt(direction) == 3) { //向左移动
            var nextDiv = $q(".EIMS_C_10005_1_Item")[i];
            if (IsNullOrEmpty(nextDiv) || nextDiv.getAttribute("loaded") == "1") {
                return;
            }

            var curDiv = $q(".EIMS_C_10005_1_Item")[i - 1];
            var cId = curDiv.getAttribute("nextId");
            var url = curDiv.getAttribute("url");

            if (IsNullOrEmpty(cId)) {
                return;
            }

            url = MergeUrlParas(url, false, ["Id"], [cId]);
            var ajax = new Ajax();
            ajax.getData(url, "EIMS_C_10005_1_IndexItem", function (data, script) {
                if (IsNullOrEmpty(data)) {
                    return;
                }

                var s = document.createElement("span");
                s.innerHTML = data;

                var nextId = "";
                //取下一个ID
                var id = "," + cId + ",";
                var startIndex = EIMS_C_10005_1.Config.RowIds.indexOf(id);

                if (startIndex >= 0) {
                    var str = EIMS_C_10005_1.Config.RowIds.substr(startIndex + id.length);
                    nextId = str.substr(0,str.indexOf(","));
                }

                var reg = new RegExp("Page\s*=.*?" + EIMS_C_10005_1.Config.NoRulePage);
                if (reg.test(data)) {
                    var r = s.querySelectorAll("#" + EIMS_C_10005_1.Config.RulePageContentID)[0];
                    nextDiv.innerHTML = r.outerHTML;
                }else{
                    var r = s.querySelectorAll("#EIMS_C_10005_1_IndexItem")[0];
                    nextDiv.innerHTML = r.innerHTML;
                }

                nextDiv.className = "EIMS_C_10005_1_Item";
                nextDiv.style["height"] = "";
                nextDiv.setAttribute("loaded", "1");
                nextDiv.setAttribute("nextId", nextId);

                var iframe = nextDiv.querySelectorAll("iframe");
                if (iframe && iframe.length > 0) {
                    iframe[0].src = MergeUrlParas(EIMS_C_10005_1.Config.MultImageSrc, false, ["Id"], [cId]);
                }

                ReLoadImage(nextDiv);

                if (!IsNullOrEmpty(nextId)) {
                    var newDiv = document.createElement("div");

                    newDiv.className = "EIMS_C_10005_1_Item EIMS_C_10005_1_loading";
                    newDiv.style["width"] = document.body.clientWidth + "px";
                    newDiv.style["height"] = "auto";
                    $q("#EIMS_C_10005_1_moveContainer")[0].appendChild(newDiv);

                    EIMS_C_10005_1.Scroll.setMoveCount(EIMS_C_10005_1.Scroll.getMoveCount() + 1);
                }

            }, false);
        }

        if (parseInt(direction) == 4) { //向右移动
            if (i > 0) {
                return;
            }

            var preDiv = $q(".EIMS_C_10005_1_Item")[i];
            if (IsNullOrEmpty(preDiv) || preDiv.getAttribute("loaded") == "1") {
                return;
            }

            var curDiv = $q(".EIMS_C_10005_1_Item")[i + 1];
            var cId = curDiv.getAttribute("preid");
            var url = curDiv.getAttribute("url");

            if (IsNullOrEmpty(cId)) {
                return;
            }

            url = MergeUrlParas(url, false, ["Id"], [cId]);

            var ajax = new Ajax();
            ajax.getData(url, "EIMS_C_10005_1_IndexItem", function (data, script) {
                if (IsNullOrEmpty(data)) {
                    return;
                }

                var s = document.createElement("span");
                s.innerHTML = data;

                //取上一个ID
                var id = "," + cId + ",";
                var startIndex = EIMS_C_10005_1.Config.RowIds.indexOf(id);

                if (startIndex >= 0) {
                    var str = EIMS_C_10005_1.Config.RowIds.substr(0,startIndex);
                    preid = str.substr(str.lastIndexOf(",") + 1);
                }

                var reg = new RegExp("Page\s*=.*?" + EIMS_C_10005_1.Config.NoRulePage);
                if (reg.test(data)) {
                    var r = s.querySelectorAll("#" + EIMS_C_10005_1.Config.RulePageContentID)[0];
                    preDiv.innerHTML = r.outerHTML;
                }else{
                    var r = s.querySelectorAll("#EIMS_C_10005_1_IndexItem")[0];
                    preDiv.innerHTML = r.innerHTML;
                }

                preDiv.className = "EIMS_C_10005_1_Item";
                preDiv.style["Height"] = "";
                preDiv.setAttribute("loaded", "1");
                preDiv.setAttribute("preid", preid);

                var iframe = preDiv.querySelectorAll("iframe");
                if (iframe && iframe.length > 0) {
                    iframe[0].src = MergeUrlParas(EIMS_C_10005_1.Config.MultImageSrc, false, ["Id"], [cId]);
                }

                ReLoadImage(preDiv);

                if (IsNullOrEmpty(preid)) {
                    return;
                }

                EIMS_C_10005_1.Timeout = setTimeout(function () {
                    var newDiv = document.createElement("div");

                    newDiv.className = "EIMS_C_10005_1_Item EIMS_C_10005_1_loading";
                    newDiv.style["width"] = document.body.clientWidth + "px";
                    newDiv.style["Height"] = "auto";
                    newDiv.innerHTML = "&nbsp;";
                    $q("#EIMS_C_10005_1_moveContainer")[0].insertBefore(newDiv, preDiv);
                    EIMS_C_10005_1.Scroll.setMoveCount(EIMS_C_10005_1.Scroll.getMoveCount() + 1);

                    var tf = $q("#EIMS_C_10005_1_moveContainer")[0].style[EIMS_C_10005_1.Scroll.getTransform()];
                    var x = 0;
                    if (tf != "") {
                        var position = tf.split('(')[1].split(',');
                        x = parseInt(position[0]);
                    }

                    $q("#EIMS_C_10005_1_moveContainer")[0].style[EIMS_C_10005_1.Scroll.getTransform()] = "translate(" + (x - document.body.clientWidth) + "px, 0px) scale(1)";
                }, 800);

            }, false);
        }
    }
}
/*end_xn_mc_casev_1_warp*/


/*news*/
$(function(){
    if($("#EIMS_C_10001_1Container").length > 0){
        var cli = $q("#EIMS_C_10001_1Container li");
        if (cli && cli.length > 0) {
            cli[0].className = "EIMS_C_10001_1Active";
        }
        cli = $q("#EIMS_C_10001_1Status li");
        if (cli && cli.length > 0) {
            cli[0].className = "EIMS_C_10001_1SActive";
        }

        var div = $q(".EIMS_C_10001_1DIV");
        var li = $q("#EIMS_C_10001_1Container li");

        for (var i = div.length; i < li.length; i++) {
            var newDiv = document.createElement("div");
            newDiv.className = "EIMS_C_10001_1DIV loading";
            newDiv.style["width"] = (document.body.clientWidth - parseInt(CurrentStyle(div[0]).paddingLeft) - parseInt(CurrentStyle(div[0]).paddingRight)) + "px";

            $q("#EIMS_C_10001_1Move")[0].appendChild(newDiv);
        }

        div[0].setAttribute("loaded", "1");

        window.LoadImage = function (obj) {
            var imgs = obj.querySelectorAll("img");
            for (var x = 0; x < imgs.length; x++) {

                if (CurrentStyle(imgs[x]).display == "none") {
                    continue;
                }

                if (IsNullOrEmpty(imgs[x].src)) {
                    var pic = imgs[x].getAttribute("loadsrc");
                    if (!IsNullOrEmpty(pic)) {
                        imgs[x].src = pic;
                    }
                }
            }
        }

        LoadImage($q("#EIMS_C_10001_1DIV1")[0]);

        window.EIMS_C_10001_1Scroll1 = new Scroll("EIMS_C_10001_1Move", 1, document.body.clientWidth, $q("#EIMS_C_10001_1Container li").length, document.body.clientWidth, 0, false, function (i) {
            var div, li = $q("#EIMS_C_10001_1Container li"), status = $q("#EIMS_C_10001_1Status li");
            if (li == null || li.length <= 0) {
                return;
            }

            div = $q(".EIMS_C_10001_1DIV")[i];

            for (var j = 0; j < li.length; j++) {
                li[j].className = "EIMS_C_10001_1Default";
                status[j].className = "EIMS_C_10001_1SDefault";
            }

            li[i].className = "EIMS_C_10001_1Active";
            status[i].className = "EIMS_C_10001_1SActive";

            setTimeout(function () {
                if (div.getAttribute("loaded") == "1") {
                    return;
                }

                var url = li[i].getAttribute("href");
                if (url == null || url == "" || typeof url == undefined) {
                    return;
                }

                new Ajax().getData(url, "", function (data, script) {
                    var div = $q(".EIMS_C_10001_1DIV")[i];

                    div.setAttribute("loaded", "1");
                    div.className = "EIMS_C_10001_1DIV";

                    div.innerHTML = data;

                    setTimeout(function () {
                        LoadImage(div);
                    }, 100);

                    if (script != "") {
                        eval(script);
                    }
                });

            }, 250);
        }, function () {
            var bar = $q(".scrollBar");
            for (var i = 0; i < bar.length; i++) {
                bar[i].style["opacity"] = "0";
            }
        });

        //var scrollHeight = $q("#EIMS_C_10001_1DIV1")[0].scrollHeight;
        //var divHeight = document.body.clientHeight - $q("header")[0].offsetHeight - $q("#EIMS_C_10001_1Container")[0].offsetHeight;
        //window.EIMS_C_10001_1DIV1 = new Scroll("EIMS_C_10001_1DIV1", 2, document.body.clientWidth, scrollHeight/divHeight, document.body.clientWidth, scrollHeight, true);

        window.EIMS_C_10001_1GoType = function (obj) {
            var index = parseInt(obj.getAttribute("index") - 1);
            EIMS_C_10001_1Scroll1.goPage(index);
        };

        window.EIMS_C_10001_1Resize = function () {
            var types = $q(".EIMS_C_10001_1DIV");

            for (var i = 0; i < types.length; i++) {
                types[i].style["width"] = (document.body.clientWidth - parseInt(CurrentStyle(types[0]).paddingLeft) - parseInt(CurrentStyle(types[0]).paddingRight)) + "px";
            }

            EIMS_C_10001_1Scroll1.setMovingLength(document.body.clientWidth);
            //EIMS_C_10001_1DIV1.resize(document.body.clientHeight - $q("header")[0].offsetHeight);
        };

        window.addEventListener("resize", function () {
            EIMS_C_10001_1Resize();
        });

        EIMS_C_10001_1Resize();
    }
});
/*end_news*/

/*hpro*/
$(function(){
    if($("#EIMS_C_10001_2Container").length > 0){
        var cli = $q("#EIMS_C_10001_2Container li");
        if (cli && cli.length > 0) {
            cli[0].className = "EIMS_C_10001_2Active";
        }
        cli = $q("#EIMS_C_10001_2Status li");
        if (cli && cli.length > 0) {
            cli[0].className = "EIMS_C_10001_2SActive";
        }

        var div = $q(".EIMS_C_10001_2DIV");
        var li = $q("#EIMS_C_10001_2Container li");

        for (var i = div.length; i < li.length; i++) {
            var newDiv = document.createElement("div");
            newDiv.className = "EIMS_C_10001_2DIV loading";
            newDiv.style["width"] = (document.body.clientWidth - parseInt(CurrentStyle(div[0]).paddingLeft) - parseInt(CurrentStyle(div[0]).paddingRight)) + "px";

            $q("#EIMS_C_10001_2Move")[0].appendChild(newDiv);
        }

        div[0].setAttribute("loaded", "1");

        window.LoadImage = function (obj) {
            var imgs = obj.querySelectorAll("img");
            for (var x = 0; x < imgs.length; x++) {

                if (CurrentStyle(imgs[x]).display == "none") {
                    continue;
                }

                if (IsNullOrEmpty(imgs[x].src)) {
                    var pic = imgs[x].getAttribute("loadsrc");
                    if (!IsNullOrEmpty(pic)) {
                        imgs[x].src = pic;
                    }
                }
            }
        }

        LoadImage($q("#EIMS_C_10001_2DIV1")[0]);

        window.EIMS_C_10001_2Scroll1 = new Scroll("EIMS_C_10001_2Move", 1, document.body.clientWidth, $q("#EIMS_C_10001_2Container li").length, document.body.clientWidth, 0, false, function (i) {
            var div, li = $q("#EIMS_C_10001_2Container li"), status = $q("#EIMS_C_10001_2Status li");
            if (li == null || li.length <= 0) {
                return;
            }

            div = $q(".EIMS_C_10001_2DIV")[i];

            for (var j = 0; j < li.length; j++) {
                li[j].className = "EIMS_C_10001_2Default";
                status[j].className = "EIMS_C_10001_2SDefault";
            }

            li[i].className = "EIMS_C_10001_2Active";
            status[i].className = "EIMS_C_10001_2SActive";

            setTimeout(function () {
                if (div.getAttribute("loaded") == "1") {
                    return;
                }

                var url = li[i].getAttribute("href");
                if (url == null || url == "" || typeof url == undefined) {
                    return;
                }

                new Ajax().getData(url, "", function (data, script) {
                    var div = $q(".EIMS_C_10001_2DIV")[i];

                    div.setAttribute("loaded", "1");
                    div.className = "EIMS_C_10001_2DIV";

                    div.innerHTML = data;

                    setTimeout(function () {
                        LoadImage(div);
                    }, 100);

                    if (script != "") {
                        eval(script);
                    }
                });

            }, 250);
        }, function () {
            var bar = $q(".scrollBar");
            for (var i = 0; i < bar.length; i++) {
                bar[i].style["opacity"] = "0";
            }
        });

        //var scrollHeight = $q("#EIMS_C_10001_2DIV1")[0].scrollHeight;
        //var divHeight = document.body.clientHeight - $q("header")[0].offsetHeight - $q("#EIMS_C_10001_2Container")[0].offsetHeight;
        //window.EIMS_C_10001_2DIV1 = new Scroll("EIMS_C_10001_2DIV1", 2, document.body.clientWidth, scrollHeight/divHeight, document.body.clientWidth, scrollHeight, true);

        window.EIMS_C_10001_2GoType = function (obj) {
            var index = parseInt(obj.getAttribute("index") - 1);
            EIMS_C_10001_2Scroll1.goPage(index);
        };

        window.EIMS_C_10001_2Resize = function () {
            var types = $q(".EIMS_C_10001_2DIV");

            for (var i = 0; i < types.length; i++) {
                types[i].style["width"] = (document.body.clientWidth - parseInt(CurrentStyle(types[0]).paddingLeft) - parseInt(CurrentStyle(types[0]).paddingRight)) + "px";
            }

            EIMS_C_10001_2Scroll1.setMovingLength(document.body.clientWidth);
            //EIMS_C_10001_2DIV1.resize(document.body.clientHeight - $q("header")[0].offsetHeight);
        };

        window.addEventListener("resize", function () {
            EIMS_C_10001_2Resize();
        });

        EIMS_C_10001_2Resize();
    }
});
/*end_hpro*/

/*case*/
$(function(){
    if($q("#EIMS_C_10001_3Container li").length > 0){
        $q("#EIMS_C_10001_3Container li")[0].className = "EIMS_C_10001_3Active";
        $q("#EIMS_C_10001_3Status li")[0].className = "EIMS_C_10001_3SActive";

        var div = $q(".EIMS_C_10001_3DIV");
        var li = $q("#EIMS_C_10001_3Container li");

        for (var i = div.length; i < li.length; i++) {
            var newDiv = document.createElement("div");
            newDiv.className = "EIMS_C_10001_3DIV loading";
            newDiv.style["width"] = (document.body.clientWidth - parseInt(CurrentStyle(div[0]).paddingLeft) - parseInt(CurrentStyle(div[0]).paddingRight)) + "px";

            $q("#EIMS_C_10001_3Move")[0].appendChild(newDiv);
        }

        div[0].setAttribute("loaded", "1");

        window.LoadImage = function (obj) {
            var imgs = obj.querySelectorAll("img");
            for (var x = 0; x < imgs.length; x++) {

                if (CurrentStyle(imgs[x]).display == "none") {
                    continue;
                }

                if (IsNullOrEmpty(imgs[x].src)) {
                    var pic = imgs[x].getAttribute("loadsrc");
                    if (!IsNullOrEmpty(pic)) {
                        imgs[x].src = pic;
                    }
                }
            }
        }

        LoadImage($q("#EIMS_C_10001_3DIV1")[0]);

        window.EIMS_C_10001_3Scroll1 = new Scroll("EIMS_C_10001_3Move", 1, document.body.clientWidth, $q("#EIMS_C_10001_3Container li").length, document.body.clientWidth, 0, false, function (i) {
            var div, li = $q("#EIMS_C_10001_3Container li"), status = $q("#EIMS_C_10001_3Status li");
            if (li == null || li.length <= 0) {
                return;
            }

            div = $q(".EIMS_C_10001_3DIV")[i];

            for (var j = 0; j < li.length; j++) {
                li[j].className = "EIMS_C_10001_3Default";
                status[j].className = "EIMS_C_10001_3SDefault";
            }

            li[i].className = "EIMS_C_10001_3Active";
            status[i].className = "EIMS_C_10001_3SActive";

            setTimeout(function () {
                if (div.getAttribute("loaded") == "1") {
                    return;
                }

                var url = li[i].getAttribute("href");
                if (url == null || url == "" || typeof url == undefined) {
                    return;
                }

                new Ajax().getData(url, "", function (data, script) {
                    var div = $q(".EIMS_C_10001_3DIV")[i];

                    div.setAttribute("loaded", "1");
                    div.className = "EIMS_C_10001_3DIV";

                    div.innerHTML = data;

                    setTimeout(function () {
                        LoadImage(div);
                    }, 100);

                    if (script != "") {
                        eval(script);
                    }
                });

            }, 250);
        }, function () {
            var bar = $q(".scrollBar");
            for (var i = 0; i < bar.length; i++) {
                bar[i].style["opacity"] = "0";
            }
        });

        //var scrollHeight = $q("#EIMS_C_10001_3DIV1")[0].scrollHeight;
        //var divHeight = document.body.clientHeight - $q("header")[0].offsetHeight - $q("#EIMS_C_10001_3Container")[0].offsetHeight;
        //window.EIMS_C_10001_3DIV1 = new Scroll("EIMS_C_10001_3DIV1", 2, document.body.clientWidth, scrollHeight/divHeight, document.body.clientWidth, scrollHeight, true);

        window.EIMS_C_10001_3GoType = function (obj) {
            var index = parseInt(obj.getAttribute("index") - 1);
            EIMS_C_10001_3Scroll1.goPage(index);
        };

        window.EIMS_C_10001_3Resize = function () {
            var types = $q(".EIMS_C_10001_3DIV");

            for (var i = 0; i < types.length; i++) {
                types[i].style["width"] = (document.body.clientWidth - parseInt(CurrentStyle(types[0]).paddingLeft) - parseInt(CurrentStyle(types[0]).paddingRight)) + "px";
            }

            EIMS_C_10001_3Scroll1.setMovingLength(document.body.clientWidth);
            //EIMS_C_10001_3DIV1.resize(document.body.clientHeight - $q("header")[0].offsetHeight);
        };

        window.addEventListener("resize", function () {
            EIMS_C_10001_3Resize();
        });

        EIMS_C_10001_3Resize();
    }
});
/*end_case*/

/*new_pro*/
$(function(){
    if($("#new_pro").length > 0){
        var cli = $q("#EIMS_C_10001_4Container li");
        if (cli && cli.length > 0) {
            cli[0].className = "EIMS_C_10001_4Active";
        }
        cli = $q("#EIMS_C_10001_4Status li");
        if (cli && cli.length > 0) {
            cli[0].className = "EIMS_C_10001_4SActive";
        }

        var div = $q(".EIMS_C_10001_4DIV");
        var li = $q("#EIMS_C_10001_4Container li");

        for (var i = div.length; i < li.length; i++) {
            var newDiv = document.createElement("div");
            newDiv.className = "EIMS_C_10001_4DIV loading";
            newDiv.style["width"] = (document.body.clientWidth - parseInt(CurrentStyle(div[0]).paddingLeft) - parseInt(CurrentStyle(div[0]).paddingRight)) + "px";

            $q("#EIMS_C_10001_4Move")[0].appendChild(newDiv);
        }

        div[0].setAttribute("loaded", "1");

        window.LoadImage = function (obj) {
            var imgs = obj.querySelectorAll("img");
            for (var x = 0; x < imgs.length; x++) {

                if (CurrentStyle(imgs[x]).display == "none") {
                    continue;
                }

                if (IsNullOrEmpty(imgs[x].src)) {
                    var pic = imgs[x].getAttribute("loadsrc");
                    if (!IsNullOrEmpty(pic)) {
                        imgs[x].src = pic;
                    }
                }
            }
        }

        LoadImage($q("#EIMS_C_10001_4DIV1")[0]);

        window.EIMS_C_10001_4Scroll1 = new Scroll("EIMS_C_10001_4Move", 1, document.body.clientWidth, $q("#EIMS_C_10001_4Container li").length, document.body.clientWidth, 0, false, function (i) {
            var div, li = $q("#EIMS_C_10001_4Container li"), status = $q("#EIMS_C_10001_4Status li");
            if (li == null || li.length <= 0) {
                return;
            }

            div = $q(".EIMS_C_10001_4DIV")[i];

            for (var j = 0; j < li.length; j++) {
                li[j].className = "EIMS_C_10001_4Default";
                status[j].className = "EIMS_C_10001_4SDefault";
            }

            li[i].className = "EIMS_C_10001_4Active";
            status[i].className = "EIMS_C_10001_4SActive";

            setTimeout(function () {
                if (div.getAttribute("loaded") == "1") {
                    return;
                }

                var url = li[i].getAttribute("href");
                if (url == null || url == "" || typeof url == undefined) {
                    return;
                }

                new Ajax().getData(url, "", function (data, script) {
                    var div = $q(".EIMS_C_10001_4DIV")[i];

                    div.setAttribute("loaded", "1");
                    div.className = "EIMS_C_10001_4DIV";

                    div.innerHTML = data;

                    setTimeout(function () {
                        LoadImage(div);
                    }, 100);

                    if (script != "") {
                        eval(script);
                    }
                });

            }, 250);
        }, function () {
            var bar = $q(".scrollBar");
            for (var i = 0; i < bar.length; i++) {
                bar[i].style["opacity"] = "0";
            }
        });

        //var scrollHeight = $q("#EIMS_C_10001_4DIV1")[0].scrollHeight;
        //var divHeight = document.body.clientHeight - $q("header")[0].offsetHeight - $q("#EIMS_C_10001_4Container")[0].offsetHeight;
        //window.EIMS_C_10001_4DIV1 = new Scroll("EIMS_C_10001_4DIV1", 2, document.body.clientWidth, scrollHeight/divHeight, document.body.clientWidth, scrollHeight, true);

        window.EIMS_C_10001_4GoType = function (obj) {
            var index = parseInt(obj.getAttribute("index") - 1);
            EIMS_C_10001_4Scroll1.goPage(index);
        };

        window.EIMS_C_10001_4Resize = function () {
            var types = $q(".EIMS_C_10001_4DIV");

            for (var i = 0; i < types.length; i++) {
                types[i].style["width"] = (document.body.clientWidth - parseInt(CurrentStyle(types[0]).paddingLeft) - parseInt(CurrentStyle(types[0]).paddingRight)) + "px";
            }

            EIMS_C_10001_4Scroll1.setMovingLength(document.body.clientWidth);
            //EIMS_C_10001_4DIV1.resize(document.body.clientHeight - $q("header")[0].offsetHeight);
        };

        window.addEventListener("resize", function () {
            EIMS_C_10001_4Resize();
        });

        EIMS_C_10001_4Resize();
    }
});
/*end_new_pro*/

/*pro_view_tu_banner*/
$(function(){
    if($("#pro_view_tu_banner").length > 0){
        // var firstImages = $q(".EIMS_C_10004_2Img")[0].querySelectorAll("img");
        // for (var iIndex = 0; iIndex < firstImages.length; iIndex++) {
        //     firstImages[iIndex].setAttribute("src", firstImages[iIndex].getAttribute("loadsrc"));
        // }

        var divs = $q(".EIMS_C_10004_2Img");
        for (var i = 0; i < divs.length; i++) {

            var imgs = divs[i].querySelectorAll("img");
            for (var x = 0; x < imgs.length; x++) {
                if (imgs[x].src == "") {
                    imgs[x].src = imgs[x].getAttribute("loadsrc");
                }
            }
        };

        $q(".EIMS_C_10004_2Img")[0].className = "EIMS_C_10004_2Img";

        window.EIMS_C_10004_2Scroll1 = new Scroll("EIMS_C_10004_2Move", 1, document.body.clientWidth, $q("#EIMS_C_10004_2Container li").length, document.body.clientWidth, 0, false, function (i) {

            setTimeout(function () {
                var imgs = $q(".EIMS_C_10004_2Img")[i].querySelectorAll("img");
                for (var x = 0; x < imgs.length; x++) {
                    if (imgs[x].src == "") {
                        imgs[x].src = imgs[x].getAttribute("loadsrc");
                    }
                }
            }, 100);

            var imgs = $q(".EIMS_C_10004_2Img");
            for (var j = 0; j < imgs.length; j++) {
                imgs[j].className = "EIMS_C_10004_2Img";
            }

            var li = $q("#EIMS_C_10004_2Container li");
            if (li == null || li.length <= 0) {
                return;
            }

            for (var j = 0; j < li.length; j++) {
                li[j].className = "EIMS_C_10004_2Default";
            }

            if (li.length <= i) {
                i = li.length - 1;
            }
            li[i].className = "EIMS_C_10004_2Active";

        });

        window.EIMS_C_10004_2GoType = function (obj) {
            var index = parseInt(obj.getAttribute("index"));
            EIMS_C_10004_2Scroll1.goPage(index);
        };

        window.EIMS_C_10004_2Resize = function () {
            var imgs = $q(".EIMS_C_10004_2Img");
            var li = $q("#EIMS_C_10004_2Container li");
            EIMS_C_10004_2Scroll1.setMovingLength(document.body.clientWidth);

            for (var i = 0; i < imgs.length; i++) {
                imgs[i].style["width"] = document.body.clientWidth + "px";
            }
        };

        window.addEventListener("resize", function () {
            EIMS_C_10004_2Resize();
        });

        EIMS_C_10004_2Resize();
    }
});
/*end_pro_view_tu_banner*/

/*xn_mc_prodv_1_wrap*/
var EIMS_C_10005_1 = {
    Scroll: null,
    Timeout: null,
    Config:{
        MultImageSrc: "/m/pro_view_tu.aspx",
        NoRulePage:"/m/lose.aspx",//无权限提示页面名称
        RulePageContentID:"content",//过滤限页面内容的ID
        RowIds:""//行ID串
    },

    Init : function () {
        EIMS_C_10005_1.Config.RowIds = "," + EIMS_C_10005_1_PIds + ",";

        var cId = QueryString("Id");
        var id = "," + cId + ",";
        var nextid, preid, str;
        var firstDiv = $q("#EIMS_C_10005_1_IndexItem")[0];

        var startIndex = EIMS_C_10005_1.Config.RowIds.indexOf(id);
        if (startIndex >= 0) {
            str = EIMS_C_10005_1.Config.RowIds.substr(startIndex + id.length);
            nextid = str.substr(0,str.indexOf(","));
        }
        firstDiv.setAttribute("nextId", nextid);

        startIndex = EIMS_C_10005_1.Config.RowIds.indexOf(id);
        if (startIndex >= 0) {
            str = EIMS_C_10005_1.Config.RowIds.substr(0,startIndex);
            preid = str.substr(str.lastIndexOf(",") + 1);
        }
        firstDiv.setAttribute("preid", preid);

        var scrollHeight = firstDiv.scrollHeight;
        var divHeight = document.body.clientHeight;
        /*- $q("header")[0].offsetHeight;*/
        EIMS_C_10005_1.Scroll = new Scroll("EIMS_C_10005_1_moveContainer", 1, document.body.clientWidth, 1, document.body.clientWidth, divHeight, false, EIMS_C_10005_1.moveBack);

        //var preid = firstDiv.getAttribute("preid");
        //var nextid = firstDiv.getAttribute("nextid");
        var moveCount = 1;

        if (!IsNullOrEmpty(preid)) {
            var newDiv = document.createElement("div");
            newDiv.className = "EIMS_C_10005_1_Item EIMS_C_10005_1_loading";
            newDiv.style["width"] = document.body.clientWidth + "px";
            newDiv.style["height"] = "auto";
            newDiv.innerHTML = "&nbsp;";
            $q("#EIMS_C_10005_1_moveContainer")[0].insertBefore(newDiv, firstDiv);

            $q("#EIMS_C_10005_1_moveContainer")[0].style[EIMS_C_10005_1.Scroll.getTransform()] = "translate(-" + document.body.clientWidth + "px, 0px) scale(1)";
            moveCount++;
        }

        if (!IsNullOrEmpty(nextid)) {
            var newDiv = document.createElement("div");
            newDiv.className = "EIMS_C_10005_1_Item EIMS_C_10005_1_loading";
            newDiv.style["width"] = document.body.clientWidth + "px";
            newDiv.style["height"] = "auto";
            newDiv.innerHTML = "&nbsp;";
            $q("#EIMS_C_10005_1_moveContainer")[0].appendChild(newDiv);
            moveCount++;
        }

        if (moveCount>1) {
            EIMS_C_10005_1.Scroll.setMoveCount(moveCount);
        }

        window.addEventListener("resize", function () {
            EIMS_C_10005_1.resize();
        });

        EIMS_C_10005_1.resize();
    },

    resize : function () {
        var EIMS_C_10005_1_Item = $q(".EIMS_C_10005_1_Item");
        for (var i = 0; i < EIMS_C_10005_1_Item.length; i++) {
            EIMS_C_10005_1_Item[i].style["width"] = document.body.clientWidth + "px";
        }
        EIMS_C_10005_1.Scroll.setMovingLength(document.body.clientWidth);
    },
    moveBack : function (i, direction) {
        clearTimeout(EIMS_C_10005_1.Timeout);

        if (parseInt(direction) == 3) { //向左移动
            var nextDiv = $q(".EIMS_C_10005_1_Item")[i];
            if (IsNullOrEmpty(nextDiv) || nextDiv.getAttribute("loaded") == "1") {
                return;
            }

            var curDiv = $q(".EIMS_C_10005_1_Item")[i - 1];
            var cId = curDiv.getAttribute("nextId");
            var url = curDiv.getAttribute("url");

            if (IsNullOrEmpty(cId)) {
                return;
            }

            url = MergeUrlParas(url, false, ["Id"], [cId]);
            var ajax = new Ajax();
            ajax.getData(url, "EIMS_C_10005_1_IndexItem", function (data, script) {
                if (IsNullOrEmpty(data)) {
                    return;
                }

                var s = document.createElement("span");
                s.innerHTML = data;

                var nextId = "";
                //取下一个ID
                var id = "," + cId + ",";
                var startIndex = EIMS_C_10005_1.Config.RowIds.indexOf(id);

                if (startIndex >= 0) {
                    var str = EIMS_C_10005_1.Config.RowIds.substr(startIndex + id.length);
                    nextId = str.substr(0,str.indexOf(","));
                }

                var reg = new RegExp("Page\s*=.*?" + EIMS_C_10005_1.Config.NoRulePage);
                if (reg.test(data)) {
                    var r = s.querySelectorAll("#" + EIMS_C_10005_1.Config.RulePageContentID)[0];
                    nextDiv.innerHTML = r.outerHTML;
                }else{
                    var r = s.querySelectorAll("#EIMS_C_10005_1_IndexItem")[0];
                    nextDiv.innerHTML = r.innerHTML;
                }

                nextDiv.className = "EIMS_C_10005_1_Item";
                nextDiv.style["height"] = "";
                nextDiv.setAttribute("loaded", "1");
                nextDiv.setAttribute("nextId", nextId);

                var iframe = nextDiv.querySelectorAll("iframe");
                if (iframe && iframe.length > 0) {
                    iframe[0].src = MergeUrlParas(EIMS_C_10005_1.Config.MultImageSrc, false, ["Id"], [cId]);
                }

                ReLoadImage(nextDiv);

                if (!IsNullOrEmpty(nextId)) {
                    var newDiv = document.createElement("div");

                    newDiv.className = "EIMS_C_10005_1_Item EIMS_C_10005_1_loading";
                    newDiv.style["width"] = document.body.clientWidth + "px";
                    newDiv.style["height"] = "auto";
                    $q("#EIMS_C_10005_1_moveContainer")[0].appendChild(newDiv);

                    EIMS_C_10005_1.Scroll.setMoveCount(EIMS_C_10005_1.Scroll.getMoveCount() + 1);
                }

            }, false);
        }

        if (parseInt(direction) == 4) { //向右移动
            if (i > 0) {
                return;
            }

            var preDiv = $q(".EIMS_C_10005_1_Item")[i];
            if (IsNullOrEmpty(preDiv) || preDiv.getAttribute("loaded") == "1") {
                return;
            }

            var curDiv = $q(".EIMS_C_10005_1_Item")[i + 1];
            var cId = curDiv.getAttribute("preid");
            var url = curDiv.getAttribute("url");

            if (IsNullOrEmpty(cId)) {
                return;
            }

            url = MergeUrlParas(url, false, ["Id"], [cId]);

            var ajax = new Ajax();
            ajax.getData(url, "EIMS_C_10005_1_IndexItem", function (data, script) {
                if (IsNullOrEmpty(data)) {
                    return;
                }

                var s = document.createElement("span");
                s.innerHTML = data;

                //取上一个ID
                var id = "," + cId + ",";
                var startIndex = EIMS_C_10005_1.Config.RowIds.indexOf(id);

                if (startIndex >= 0) {
                    var str = EIMS_C_10005_1.Config.RowIds.substr(0,startIndex);
                    preid = str.substr(str.lastIndexOf(",") + 1);
                }

                var reg = new RegExp("Page\s*=.*?" + EIMS_C_10005_1.Config.NoRulePage);
                if (reg.test(data)) {
                    var r = s.querySelectorAll("#" + EIMS_C_10005_1.Config.RulePageContentID)[0];
                    preDiv.innerHTML = r.outerHTML;
                }else{
                    var r = s.querySelectorAll("#EIMS_C_10005_1_IndexItem")[0];
                    preDiv.innerHTML = r.innerHTML;
                }

                preDiv.className = "EIMS_C_10005_1_Item";
                preDiv.style["Height"] = "";
                preDiv.setAttribute("loaded", "1");
                preDiv.setAttribute("preid", preid);

                var iframe = preDiv.querySelectorAll("iframe");
                if (iframe && iframe.length > 0) {
                    iframe[0].src = MergeUrlParas(EIMS_C_10005_1.Config.MultImageSrc, false, ["Id"], [cId]);
                }

                ReLoadImage(preDiv);

                if (IsNullOrEmpty(preid)) {
                    return;
                }

                EIMS_C_10005_1.Timeout = setTimeout(function () {
                    var newDiv = document.createElement("div");

                    newDiv.className = "EIMS_C_10005_1_Item EIMS_C_10005_1_loading";
                    newDiv.style["width"] = document.body.clientWidth + "px";
                    newDiv.style["Height"] = "auto";
                    newDiv.innerHTML = "&nbsp;";
                    $q("#EIMS_C_10005_1_moveContainer")[0].insertBefore(newDiv, preDiv);
                    EIMS_C_10005_1.Scroll.setMoveCount(EIMS_C_10005_1.Scroll.getMoveCount() + 1);

                    var tf = $q("#EIMS_C_10005_1_moveContainer")[0].style[EIMS_C_10005_1.Scroll.getTransform()];
                    var x = 0;
                    if (tf != "") {
                        var position = tf.split('(')[1].split(',');
                        x = parseInt(position[0]);
                    }

                    $q("#EIMS_C_10005_1_moveContainer")[0].style[EIMS_C_10005_1.Scroll.getTransform()] = "translate(" + (x - document.body.clientWidth) + "px, 0px) scale(1)";
                }, 800);

            }, false);
        }
    }
}
/*end_xn_mc_prodv_1_wrap*/


/*xn_mc_reg_1_wrap*/
$(function () {
    try {
        if ($("#EIMS_C_40001_1_Panel").length > 0) {
            EIMS_C_40001_1.Init();
        }
    } catch (err) { }
});

var EIMS_C_40001_1 = {
    Init: function () {
        $("#EIMS_C_40001_1_aAgreeAccord").click(function () {
            $("#EIMS_C_40001_1_AccordContent").show();
            return false;
        });

        $("#EIMS_C_40001_1_closeAccord").click(function () {
            $("#EIMS_C_40001_1_AccordContent").hide();
            return false;
        });

        $("#EIMS_C_40001_1_agree").click(function () {
            $("#EIMS_C_40001_1_AccordContent").hide();
            $("#EIMS_C_40001_1_chkag").attr("checked", "checked");
            $("#EIMS_C_40001_1_checkCodeTip").html("");
            return false;
        });
    },

    //看不清，换一张   刷新验证码
    ChangeCode: function () {
        $("#EIMS_C_40001_1_CheckCode").click();
    },

    EIMS_C_40001_1_ShowError: function (ErrorIndex, Target) {
        $("#EIMS_C_40001_1_ShowError").html("")
        var Msg = ""
        if (ErrorIndex == 1) {
            Msg = "两次输入密码不一致"
        } else if (ErrorIndex == 2) {
            Msg = "密码长度至少6位"
        } else if (ErrorIndex == 3) {
            Msg = "会员名至少要4位以上"
        } else if (ErrorIndex == 4) {
            Msg = "您必须同意服务条款才能进行注册";
        } else if (ErrorIndex == 5) {
            Msg = "会员名信息不能为空";
        } else if (ErrorIndex == 6) {
            Msg = "请设置密码信息";
        } else if (ErrorIndex == 7) {
            Msg = "密码长度不能超过20个字符";
        } else if (ErrorIndex == 8) {
            Msg = "确认密码信息不能为空";
        } else if (ErrorIndex == 9) {
            Msg = "请填写手机号信息";
        } else if (ErrorIndex == 10) {
            Msg = "请填写Email信息";
        } else if (ErrorIndex == 11) {
            Msg = "请填写验证码";
        }

        $(Target).focus();

        alert(Msg);
    },

    CheckName: function () {
        var name = $("#EIMS_C_40001_1_txtName").val();

        if (name == "") {
            $("#EIMS_C_40001_1_Tip").html("会员名不能为空");
            return false;
        }

        var isNum = /^[0-9]*[1-9][0-9]*$/; //自然数
        var isEmail = /^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/; //邮箱格式正则
        var isMobile = /^1[3-8]{1}\d{9}$/;

        if (!isNum.test(name)) {
            if (name.length > 0 && name.indexOf("@") >= 0 || name.indexOf(".") >= 0) {
                if (!isEmail.test(name)) {
                    $("#EIMS_C_40001_1_Tip").html("邮箱格式不正确，请重新输入！");

                    return false;
                }
                else {
                    $("#EIMS_C_40001_1_Tip").html("");
                }

                if ((/[\!\|\#\%\^\&\￥\$\*\_\-\+\=\（\）\(\)\[\]\{\}\\\/\【\】\、\<\>\、\《\》\:\;\：\；\"\“\'\‘\,\，\。\)<>?]/gi).test(name)) {
                    $("#EIMS_C_40001_1_Tip").html("会员名不可包含特殊符号");
                    return false;
                } else {
                    $("#EIMS_C_40001_1_Tip").html("");
                }

                AjaxMethod("User", "CheckMail", { "email": name }, function (data) {
                    if (IsNullOrEmpty(data)) {
                        return false;
                    }

                    if (data.result == 1) {
                        return false;
                    }

                    $("#EIMS_C_40001_1_txtName").focus();
                    $("#EIMS_C_40001_1_txtName").select();
                    $("#EIMS_C_40001_1_Tip").html("邮箱已被注册,请重新输入");
                    return false;
                });

            } else if (name.length > 0 && name.length < 4 || name.length > 20) {
                $("#EIMS_C_40001_1_Tip").html("会员名应该在4--20位之间");
                return false;
            } else {
                if ((/[\!\|\#\%\^\&\￥\$\*\_\-\+\=\（\）\(\)\[\]\{\}\\\/\【\】\、\<\>\、\《\》\:\;\：\；\"\“\'\‘\,\，\.\。\)<>?]/gi).test(name)) {
                    $("#EIMS_C_40001_1_Tip").html("会员名不可包含特殊符号");
                    return false;
                }


                //增加判断会员帐号信息是否合法
                AjaxMethod("User", "CheckName", { "name": name }, function (data) {
                    if (IsNullOrEmpty(data)) {
                        return false;
                    }

                    if (data.result == 1) {
                        return true;
                    }

                    $("#EIMS_C_40001_1_Tip").html("会员名已被注册,请重新输入");
                    return false;
                });
            }
        } else {
            //手机号
            if (name.length > 0 && !isMobile.test(name)) {
                $("#EIMS_C_40001_1_Tip").html("手机号码格式不正确,应为11位并以13/14/15/16/17/18开头！");
                return false;

            } else {
                AjaxMethod("User", "CheckMobile", { "mobile": name }, function (data) {
                    if (IsNullOrEmpty(data)) {
                        return false;
                    }

                    if (data.result == 1) {
                        return true;
                    }

                    $("#EIMS_C_40001_1_Tip").html("手机号已被注册,请重新输入");
                    return false;
                });
            }
        }

        $("#EIMS_C_40001_1_Tip").html("");
        return true;
    },

    PwdEmpty: function (spanId) {
        var pwdValue = $("#EIMS_C_40001_1_txtpwd").val();

        if (pwdValue.length > 0 && pwdValue.length < 6) {
            $("#EIMS_C_40001_1_pwdTips").text("密码至少为6位！");
            return false;
        }
        if (pwdValue == "") {
            $("#" + spanId + "").html("密码不能为空");
            return false;
        }

        //判断密码中是否包含空格
        var arr = new Array();
        arr = pwdValue.split(" ");

        if (arr.length != 1) {
            $("#" + spanId + "").html("密码中不允许输入空格,请重新输入");
            return false;
        }

        if ($("#EIMS_C_40001_1_txtpwd").length > 0 && pwdValue.length < 6) {
            $("#" + spanId + "").html("密码长度至少6位");
            return false;
        }

        if (pwdValue.length > 20) {
            $("#" + spanId + "").html("密码长度不能超过20个字符");
            return false;
        }

        $("#" + spanId + "").html("");
        return true;
    },

    TruePwdEmpty: function (spanId) {
        if ($("#EIMS_C_40001_1_txtpwdtrue").val() == "") {
            $("#" + spanId + "").html("请输入确认密码！");
            return false;
        }

        if ($("#EIMS_C_40001_1_txtpwd").val() != $("#EIMS_C_40001_1_txtpwdtrue").val()) {
            $("#" + spanId + "").html("两次输入密码不一致");
            return false;
        }

        $("#" + spanId + "").html("");
        return true;
    },

    CheckCode: function (spanId) {
        //验证码
        if ($("#EIMS_C_40001_1_inCheckCode").css("display") != "none" && $("#EIMS_C_40001_1_inCheckCode").val() == "") {
            $("#" + spanId + "").html("验证码不能为空");
            return false;
        }
        //注册协议
        else if ($("#EIMS_C_40001_1_chkag").length > 0) {
            if (!$("#EIMS_C_40001_1_chkag").attr("checked")) {
                $("#" + spanId + "").html("您必须同意服务条款才能进行注册");
                return false;
            }
        }

        $("#" + spanId + "").html("");
        return true;
    },

    IsEmpty: function () {
        var ErrorIndex = 0;
        var Target;
        var name = $("#EIMS_C_40001_1_txtName");
        var pwd = $("#EIMS_C_40001_1_txtpwd");

        //验证用户名
        if (!EIMS_C_40001_1.CheckName()) {
            return false;
        }

        //密码
        else if (pwd.length > 0 && pwd.val() == "") {
            ErrorIndex = 6;
            Target = pwd;
        }
        else if (pwd.length > 0 && pwd.val().length < 6) {
            ErrorIndex = 2;
            Target = pwd;
        }
        else if (pwd.length > 0 && pwd.val().length > 20) {
            ErrorIndex = 7;
            Target = pwd;
        }
        //确认密码
        else if ($("#EIMS_C_40001_1_txtpwdtrue").val() == "") {
            ErrorIndex = 8;
            Target = $("#EIMS_C_40001_1_txtpwdtrue");
        }
        else if (pwd.val() != $("#EIMS_C_40001_1_txtpwdtrue").val()) {
            ErrorIndex = 1;
            Target = $("#EIMS_C_40001_1_txtpwdtrue");
        }
        //验证码
        else if ($("#EIMS_C_40001_1_inCheckCode").css("display") != "none" && $("#EIMS_C_40001_1_inCheckCode").val() == "") {
            ErrorIndex = 11;
            Target = $("#EIMS_C_40001_1_inCheckCode");
        }
        //注册协议
        else if (!$("#EIMS_C_40001_1_chkag").attr("checked")) {
            $("#EIMS_C_40001_1_checkCodeTip").html("您必须同意服务条款才能进行注册");
            return false;
        }
        else if ($("#EIMS_C_40001_1_chkag").length > 0) {
            if (!$("#EIMS_C_40001_1_chkag").attr("checked")) {
                ErrorIndex = 4;
                Target = $("#EIMS_C_40001_1_chkag");
            }
        }

        if (ErrorIndex == 0) {
            return true
        }

        //提示必填信息
        EIMS_C_40001_1_ShowError(ErrorIndex, Target);
        return false;
    }
}
/*end_xn_mc_reg_1_wrap*/


/*xn_mc_login_1_wrap*/
$(function () {
    try {
        if ($("#EIMS_C_40003_1_Panel").length > 0) {
            EIMS_C_40003_1.Init();
        }
    } catch (err) { }
});

var EIMS_C_40003_1 = {
    Config: {
        ToRegisterUrl: "/m/reg.aspx",  //注册页面
        ToFindPwd: "/m/getpass.aspx"      //手机找回密码  这个目标地址可自定义
    },

    Init: function () {
    },

    //去注册
    ToRegister: function () {
        $("#EIMS_C_40003_1_ToRegister a").attr("target", "_blank").attr("href", EIMS_C_40003_1.Config.ToRegisterUrl);
    },

    //找回密码
    ToFindPwd: function () {
        $("#EIMS_C_40003_1_ToFindPwd a").attr("target", "_blank").attr("href", EIMS_C_40003_1.Config.ToFindPwd);
    },

    VerifyName: function () {
        var isEmail = /^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/;
        var isMobile = /^1[3-8]{1}\d{9}$/;
        var isNumber = /^\d{11}$/;  //11位数
        var isNum = /^[0-9]*[1-9][0-9]*$/; //自然数

        //验证邮箱、手机用户名
        if (IsNullOrEmpty($("#EIMS_C_40003_1_Name").val())) {
            $("#EIMS_C_40003_1_NamePrompt").text("用户名不能为空！");

            return false;
        } else if ($("#EIMS_C_40003_1_Name").val().length > 0 && $("#EIMS_C_40003_1_Name").val().length < 4) {
            $("#EIMS_C_40003_1_NamePrompt").text("用户名不能少于4位！");

            return false;
        } else {
            $("#EIMS_C_40003_1_NamePrompt").text("");
        }

        if ($("#EIMS_C_40003_1_Name").val().indexOf("@") >= 0) {
            if (!isEmail.test($("#EIMS_C_40003_1_Name").val())) {
                $("#EIMS_C_40003_1_NamePrompt").text("邮箱格式不正确，请重新输入！");

                return false;
            }
            else {
                $("#EIMS_C_40003_1_NamePrompt").text("");
            }
        } else if (isNum.test($("#EIMS_C_40003_1_Name").val())) {
            if (!isNumber.test($("#EIMS_C_40003_1_Name").val())) {
                $("#EIMS_C_40003_1_NamePrompt").text("手机号码应为11位数字，以13/14/15/17/18开头！");

                return false;
            }
            else {
                $("#EIMS_C_40003_1_NamePrompt").text("");
            }

            if (!isMobile.test($("#EIMS_C_40003_1_Name").val())) {
                $("#EIMS_C_40003_1_NamePrompt").text("手机号码格式不正确，请重新输入！");

                return false;
            } else {
                $("#EIMS_C_40003_1_NamePrompt").text("");
            }
        }
    },

    VerifyPwd: function () {
        //验证登录密码
        if ($("#EIMS_C_40003_1_Password").val().length > 0) {
            if ($("#EIMS_C_40003_1_Password").val().length < 6) {
                $("#EIMS_C_40003_1_PwdPrompt").text("密码不能小于6位！");

                return false;
            } else {
                $("#EIMS_C_40003_1_PwdPrompt").text("");
            }
        } else {
            $("#EIMS_C_40003_1_PwdPrompt").text("密码不能为空！");
        }
    },

    VerifyCode: function () {
        if ($("#EIMS_C_40003_1_InCode").length > 0 && $("#EIMS_C_40003_1_InCode").val().length < 1) {
            $("#EIMS_C_40003_1_CheckCodePrompt").text("验证码不能为空！");

            return false;
        } else {
            $("#EIMS_C_40003_1_CheckCodePrompt").text("");
        }
    },

    LoginCheck: function () {
        if (!EIMS_C_40003_1.VerifyName) {
            return false;
        }

        if (!EIMS_C_40003_1.VerifyPwd) {
            return false;
        }

        if (!EIMS_C_40003_1.VerifyCode) {
            return false;
        }

        return true;
    }
}
/*end_xn_mc_login_1_wrap*/

/*xn_mh_2_wrap*/
$ && $(function () {
    try {
        if ($("#EIMS_C_40000_1_Panel").length < 1) {
            return;
        }

        EIMS_C_40000_1.Init();
    } catch (err) { }
});

var EIMS_C_40000_1 = {
    Config: {
        ToUserInfoUrl: "/m/member.aspx"  //去会员个人资料页  可自定义
    },

    Init: function () {
        $("#EIMS_C_40000_1_loginout").click(EIMS_C_40000_1.loginout);

        AjaxMethod("User", "IsLogin", null, function (data) {
            if (IsNullOrEmpty(data)) {
                return;
            }

            if (data.result != 1) {
                if (IsNullOrEmpty(data.msg.name)) {
                    $("#EIMS_C_40000_1_normallName").remove();
                    $("#EIMS_C_40000_1_normallName1").remove();
                } else {
                    $("#EIMS_C_40000_1_normallName").html(data.msg.name);
                }
                $("#EIMS_C_40000_1_Logined").remove();
                $("#EIMS_C_40000_1_Normall").show();

                return;
            }

            $("#EIMS_C_40000_1_loginedName").html(data.msg.name);
            $("#EIMS_C_40000_1_Normall").remove();
            $("#EIMS_C_40000_1_Logined").show();
        });

        $("#EIMS_C_40000_1_loginedName").click(function () {
            window.location.href = EIMS_C_40000_1.Config.ToUserInfoUrl;
        });
    },

    loginout: function () {
        AjaxMethod("User", "Logout", null, function (data) {
            if (data == "ok") {
                document.location.reload();
            }
        });
    }
}
/*end_xn_mh_2_wrap*/

/*xn_mc_success_1_wrap*/
$(function () {
    try {
        if ($("#EIMS_C_40002_1_Panel").length < 1) {
            return;
        }

        EIMS_C_40002_1.Init();
    } catch (Error) { }
});

var EIMS_C_40002_1 = {
    Config: {
        SendTime: null, //服务器与本机的时间间隔
        ShutDownTime: 60,  //自定义获取验证码的倒计时（单位：s）
        ShutDownTemp: 0
    },

    Init: function (option) {

        var linkUrl = MergeUrlParas(null, false, [], []);

        if (linkUrl.indexOf("?") >= 0) {
            $("#EIMS_C_40002_1_Panel1").hide();  // 注册成功
        } else {
            $("#EIMS_C_40002_1_Panel1").show();  // 注册成功
            $("#EIMS_C_40002_1_PanelOverdate").hide();  //激活过期
            $("#EIMS_C_40002_1_VerifyFailed").hide();  //激活失败
            $("#EIMS_C_40002_1_PanelVerify").hide();  //激活成功
            $("#EIMS_C_40002_1_Verified").hide();    //已激活
        }

        if (option) $.extend(EIMS_C_40002_1.Config, option);

        AjaxMethod("User", "GetUserInfo", {}, function (data) {
            if (IsNullOrEmpty(data)) {
                return;
            }

            if (data.result != 1) {
                return;
            }

            var patternMobile = /^1[3-8]\d{9}$/;
            var patternEmail = /^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/;  //使用任何格式

            if (patternMobile.test("" + data.msg.Name + "")) {
                if (IsNullOrEmpty(data.msg.RealityName)) {
                    $("#EIMS_C_40002_1_userName").html("手机用户 " + data.msg.Name + " ");
                } else {
                    $("#EIMS_C_40002_1_userName").html("手机用户 " + data.msg.RealityName + " ");
                }
            } else if (patternEmail.test("" + data.msg.Name + "")) {
                if (IsNullOrEmpty(data.msg.RealityName)) {
                    $("#EIMS_C_40002_1_userName").html("邮箱用户 " + data.msg.Name + " ");
                } else {
                    $("#EIMS_C_40002_1_userName").html("邮箱用户 " + data.msg.RealityName + " ");
                }
            } else {
                if (IsNullOrEmpty(data.msg.RealityName)) {
                    $("#EIMS_C_40002_1_userName").html(data.msg.Name);
                } else {
                    $("#EIMS_C_40002_1_userName").html(data.msg.RealityName);
                }
            }
        });

        //弹出邮箱验证框
        $(".EIMS_C_40002_1_VerityEmail").click(function () {
            if ($("#EIMS_C_40002_1_EmailPanel").length == 0) {
                return false;
            }

            if ($("#EIMS_C_40002_1_Email").val().length > 0) {
                $("#EIMS_C_40002_1_Email").attr("disabled", "disabled");
            }

            var htmlemail = $("#EIMS_C_40002_1_EmailPanel").html();

            $("#EIMS_C_40002_1_EmailPanel").show(); //邮箱验证弹出层
            $("#EIMS_C_40002_1_TransparentLayer").show();  //显示遮罩层

            $("#EIMS_C_40002_1_ConfirmClose").click(function () {
                $("#EIMS_C_40002_1_EmailPanel").hide();
                $("#EIMS_C_40002_1_TransparentLayer").hide();
            });

            $("#EIMS_C_40002_1_EmailPanel").html();
        });

        //弹出手机验证框
        $(".EIMS_C_40002_1_VerityMobile").click(function () {
            if ($("#EIMS_C_40002_1_MobilePanel").length == 0) {
                return;
            }

            if ($("#EIMS_C_40002_1_Mobile").val().length > 0) {
                $("#EIMS_C_40002_1_Mobile").attr("disabled", "disabled");
            }

            var htmlmobile = $("#EIMS_C_40002_1_MobilePanel").html();

            $("#EIMS_C_40002_1_MobilePanel").css("display", "block");
            $("#EIMS_C_40002_1_TransparentLayer").show();
            $("#EIMS_C_40002_1_mobileAlert").hide();

            $("#EIMS_C_40002_1_mobileClose").click(function () {
                $("#EIMS_C_40002_1_MobilePanel").hide();
                $("#EIMS_C_40002_1_TransparentLayer").hide();
            });

            $("#EIMS_C_40002_1_MobilePanel").html();
        });
    },

    /* 验证邮箱开始 */
    //邮箱验证
    IsEmail: function () {
        $("#EIMS_C_40002_1_EmailPrompt").text("");

        var pattern = /^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/;  //使用任何格式

        if ($("#EIMS_C_40002_1_Email").val() == "") {
            $("#EIMS_C_40002_1_EmailPrompt").text("请输入您的邮箱！");
            $("#EIMS_C_40002_1_Email").focus();
            return false;

        } else if ($("#EIMS_C_40002_1_Email").val() != "") {
            if (!pattern.test($("#EIMS_C_40002_1_Email").val())) {
                $("#EIMS_C_40002_1_EmailPrompt").text("邮箱格式不正确，请重新输入！");
                $("#EIMS_C_40002_1_Email").focus();
                return false;
            }
        }

        return true;
    },

    //发送验证邮箱
    SendVerifyEmail: function () {
        if (!EIMS_C_40002_1.IsEmail()) {
            return false;
        }

        var linkUrl = MergeUrlParas(null, false, ["type"], ["1"]);

        var vemail = $("#EIMS_C_40002_1_Email").val();
        AjaxMethod("User", "SendVerifyEmail", {
            "email": vemail,
            "url": linkUrl
        }, function (data) {
            if (IsNullOrEmpty(data)) {
                return false;
            }

            if (data.result != 1) {
                $("#EIMS_C_40002_1_EmailPrompt").html(data.msg);
                return false;
            }

            $("#EIMS_C_40002_1_Email").attr("disabled", "disabled");

            EIMS_C_40002_1.Config.ShutDownTemp = EIMS_C_40002_1.Config.ShutDownTime;
            EIMS_C_40002_1.ShowCountDownEmail();

        });
    },

    //获取验证码倒计时
    ShowCountDownEmail: function () {
        if (EIMS_C_40002_1.Config.ShutDownTemp <= 0) {
            $("#EIMS_C_40002_1_SendVerifyEmail").removeAttr("disabled");
            $("#EIMS_C_40002_1_Email").removeAttr("disabled");
            $("#EIMS_C_40002_1_SendVerifyEmail").val("发送验证邮箱");

            return false;
        }

        $("#EIMS_C_40002_1_SendVerifyEmail").attr("disabled", "disabled");
        $("#EIMS_C_40002_1_Email").attr("disabled", "disabled");
        $("#EIMS_C_40002_1_SendVerifyEmail").val(" " + EIMS_C_40002_1.Config.ShutDownTemp + " 秒 ");

        EIMS_C_40002_1.Config.ShutDownTemp--;
        setTimeout(EIMS_C_40002_1.ShowCountDownEmail, 1000);
    },

    /* 验证邮箱结束 */

    /* 验证手机开始 */
    //验证手机
    ActiveMobile: function () {
        //验证手机验证码的非空验证
        if (!EIMS_C_40002_1.VerifyMobile()) {
            return false;
        }

        //当前输入的手机号
        var mobile = $("#EIMS_C_40002_1_Mobile").val();
        var checkCode = $("#EIMS_C_40002_1_MobileCode").val();

        AjaxMethod("User", "ValidMobile", {
            "mobile": mobile,
            "checkcode": checkCode,
            "type": 1
        }, function (data) {
            if (IsNullOrEmpty(data)) {
                return false;
            }

            if (data.result == 0) {
                $("#EIMS_C_40002_1_MobileCodePrompt").text(data.msg);
                return false
            }

            document.location.href = MergeUrlParas(null, false, ["type"], ["1"]);

            $("#EIMS_C_40002_1_MobilePanel").show(); //隐藏手机验证弹出层
            //激活成功后显示不可用按钮，隐藏可用按钮
            $("#EIMS_C_40002_1_VerityMobileDis").show();
            $("#EIMS_C_40002_1_VerityMobile").hide();
        });
    },

    //手机验证
    IsMobile: function () {
        $("#EIMS_C_40002_1_MobilePrompt").text("");

        var pattern = /^1[3-8]\d{9}$/;

        if ($("#EIMS_C_40002_1_Mobile").val() == "") {

            $("#EIMS_C_40002_1_MobilePrompt").text("请输入您的手机号！");
            return false;

        } else if ($("#EIMS_C_40002_1_Mobile").val() != "") {
            if (!pattern.test($("#EIMS_C_40002_1_Mobile").val())) {

                $("#EIMS_C_40002_1_MobilePrompt").text("手机格式不正确，请重新输入！");
                return false;
            }
        }

        return true;
    },

    //发送手机验证码
    SendCodeMobile: function () {
        if (!EIMS_C_40002_1.IsMobile()) {
            return false;
        }

        var mobile = $("#EIMS_C_40002_1_Mobile").val();
        AjaxMethod("User", "SendMobileCode", { "mobile": mobile, type: 0 }, function (data) {
            if (IsNullOrEmpty(data)) {
                return false;
            }

            if (data.result == 0) {
                $("#EIMS_C_40002_1_MobileCodePrompt").text(data.msg);
                return false;
            }

            if (data.result == -3) {
                $("#EIMS_C_40002_1_MobileCodePrompt").text(data.msg);
                return false;
            }

            $("#EIMS_C_40002_1_Mobile").attr("disabled", "disabled");

            $("#EIMS_C_40002_1_mobileAlert").show();

            EIMS_C_40002_1.Config.ShutDownTemp = EIMS_C_40002_1.Config.ShutDownTime;
            EIMS_C_40002_1.ShowCountDownMobile();

            var tipTime = EIMS_C_40002_1.Config.ShutDownTime / 60;
            $("#EIMS_C_40002_1_mobileTipTime").html(tipTime);
        });
    },

    //获取验证码倒计时
    ShowCountDownMobile: function () {
        if (EIMS_C_40002_1.Config.ShutDownTemp <= 0) {
            $("#EIMS_C_40002_1_SendMobile").removeAttr("disabled");
            $("#EIMS_C_40002_1_Mobile").removeAttr("disabled");
            $("#EIMS_C_40002_1_SendMobile").val("点击获取验证码");
            $("#EIMS_C_40002_1_mobileAlert").hide();

            return false;
        }

        $("#EIMS_C_40002_1_SendMobile").attr("disabled", "disabled");
        $("#EIMS_C_40002_1_Mobile").attr("disabled", "disabled");
        $("#EIMS_C_40002_1_SendMobile").val(" " + EIMS_C_40002_1.Config.ShutDownTemp + " 秒 ");

        EIMS_C_40002_1.Config.ShutDownTemp--;
        setTimeout(EIMS_C_40002_1.ShowCountDownMobile, 1000);
    },

    //手机，验证码输入框的非空验证
    VerifyMobile: function () {
        if (!EIMS_C_40002_1.IsMobile()) {
            return false;
        }

        if ($("#EIMS_C_40002_1_MobileCode").val() == "") {
            $("#EIMS_C_40002_1_MobileCodePrompt").text("请输入您手机接收到的验证码！");
            return false;
        }

        return true;
    }

    /* 验证手机结束 */
}
/*end_xn_mc_success_1_wrap*/



/*xn_mc_getpass_1_wrap*/
/*2015/01/06*/
$(function () {
    try {
        if ($("#EIMS_C_40004_1_Panel").length > 0) {
            EIMS_C_40004_1.Init();
        }
    } catch (err) { }
});

var EIMS_C_40004_1 = {
    Config: {
        SetPwdUrl: "/m/getchapass.aspx",    //找回密码跳转页面
        SendTime: null, //服务器与本机的时间间隔
        BtnDisabledSecond: 60,  //自定义获取验证码的倒计时（单位：s）
        ShutDownTemp: 0
    },  //配置信息

    Init: function () {

    },   //初始化信息

    CheckEmail: function () {
        $("#EIMS_C_40004_1_EmailPrompt").text(""); //清空错误提示
        var val = $("#EIMS_C_40004_1_EmailTxt").val();   //获取邮箱号

        if (IsNullOrEmpty(val)) {
            $("#EIMS_C_40004_1_EmailPrompt").text("邮箱不能为空！");
            return false;
        }

        if (!/^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/.test(val)) {
            $("#EIMS_C_40004_1_EmailPrompt").text("邮箱格式错误！");
            return false;
        }

        return true;
    },

    GetCheckCode: function (obj) {
        if (!EIMS_C_40004_1.CheckEmail()) {
            return false;
        }

        var val = $("#EIMS_C_40004_1_EmailTxt").val();   //获取邮箱号

        var keyValues = { email: val, type: 1 };

        AjaxMethod("User", "SendEmailCode", keyValues, function (data) {

            if (data.result != 1) {
                $(obj).next("#EIMS_C_40004_1_EmailPrompt").text("获取验证码失败, 原因：" + data.msg);
                return;
            }

            //禁用按钮一分钟
            $(obj).attr({ "disabled": "disabled" });
            $("#EIMS_C_40004_1_EmailTxt").attr({ "disabled": "disabled" });

            EIMS_C_40004_1.Config.ShutDownTemp = EIMS_C_40004_1.Config.BtnDisabledSecond;
            EIMS_C_40004_1.ShowCountDownEmail();

        });
    },  //获取验证码

    //获取验证码倒计时
    ShowCountDownEmail: function () {
        if (EIMS_C_40004_1.Config.ShutDownTemp <= 0) {
            $("#EIMS_C_40004_1_GetCheckCode").removeAttr("disabled");
            $("#EIMS_C_40004_1_EmailTxt").removeAttr("disabled");
            $("#EIMS_C_40004_1_GetCheckCode").val("获取验证码");

            return false;
        }

        $("#EIMS_C_40004_1_GetCheckCode").attr("disabled", "disabled");
        $("#EIMS_C_40004_1_EmailTxt").attr("disabled", "disabled");
        $("#EIMS_C_40004_1_GetCheckCode").val(" " + EIMS_C_40004_1.Config.ShutDownTemp + " 秒 ");

        EIMS_C_40004_1.Config.ShutDownTemp--;
        setTimeout(EIMS_C_40004_1.ShowCountDownEmail, 1000);
    },  //倒计时

    CheckCheckCode: function (obj) {

        $("#EIMS_C_40004_1_GetCheckCode").next("#EIMS_C_40004_1_EmailPrompt").text("");
        $("#EIMS_C_40004_1_InputCheckCode").next("#EIMS_C_40004_1_CodePrompt").text("");

        var code = $("#EIMS_C_40004_1_InputCheckCode").val();  //验证码
        var val = $("#EIMS_C_40004_1_EmailTxt").val();    //邮箱号

        if (IsNullOrEmpty(val)) {
            $("#EIMS_C_40004_1_GetCheckCode").next("#EIMS_C_40004_1_EmailPrompt").text("请输入您的邮箱！");
            return;
        }

        if (!/^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/.test(val)) {
            $("#EIMS_C_40004_1_GetCheckCode").next("#EIMS_C_40004_1_EmailPrompt").text("邮箱格式错误！");
            return;
        }

        if (IsNullOrEmpty(code)) {
            $("#EIMS_C_40004_1_InputCheckCode").next("#EIMS_C_40004_1_CodePrompt").text("验证码不能为空！");
            return;
        }

        if (code.length < 3) {
            $("#EIMS_C_40004_1_InputCheckCode").next("#EIMS_C_40004_1_CodePrompt").text("验证码不匹配！");
            return;
        }

        var keyValues = { email: val, checkcode: code, seekPwdWay: "email" };

        AjaxMethod("User", "CheckEmailCheckCode", keyValues, function (data) {
            if (data.result != 1) {
                $(obj).next("#EIMS_C_40004_1_pwdPrompt").text(data.msg);
                return false;
            }

            //验证成功，跳转
            document.location.href = MergeUrlParas(EIMS_C_40004_1.Config.SetPwdUrl, true, [], []);
        });

    }   //校验验证码
}
/*end_xn_mc_getpass_1_wrap*/


/*xn_mc_getpass_2_wrap*/
/*2015/01/06*/
$(function () {
    try {
        if ($("#EIMS_C_40005_1_Panel").length > 0) {
            EIMS_C_40005_1.Init();
        }
    } catch (err) { }
});

var EIMS_C_40005_1 = {
    Config: {
        SetPwdUrl: "/m/getchapass.aspx",    //找回密码跳转页面
        SendTime: null, //服务器与本机的时间间隔
        BtnDisabledSecond: 60,  //自定义获取验证码的倒计时（单位：s）
        ShutDownTemp: 0
    },  //配置信息

    Init: function () {

    },   //初始化信息

    CheckMobile: function () {
        $(".EIMS_C_40005_1_ErrorPrompt").text(""); //清空错误提示
        var val = $("#EIMS_C_40005_1_MobileTxt").val();   //获取手机号

        if (IsNullOrEmpty(val)) {
            $("#EIMS_C_40005_1_mobilePrompt").text("手机号不能为空！");
            return false
        }

        if (!/^1[3-8]\d{9}$/.test(val)) {
            $("#EIMS_C_40005_1_mobilePrompt").text("手机号格式错误！");
            return false
        }

        return true;
    },

    GetCheckCode: function (obj) {
        var val = $("#EIMS_C_40005_1_MobileTxt").val();   //获取手机号

        if (!EIMS_C_40005_1.CheckMobile()) {
            return false;
        }

        var keyValues = { mobile: val, type: 1 };

        AjaxMethod("User", "SendMobileCode", keyValues, function (data) {

            if (data.result != 1) {
                $(obj).next("#EIMS_C_40005_1_mobilePrompt").text("获取验证码失败, 原因：" + data.msg);
                return false;
            }

            //禁用按钮一分钟
            $(obj).attr({ "disabled": "disabled" });
            $("#EIMS_C_40005_1_MobileTxt").attr("disabled", "disabled");

            EIMS_C_40005_1.Config.ShutDownTemp = EIMS_C_40005_1.Config.BtnDisabledSecond;
            EIMS_C_40005_1.ShowCountDownMobile();

        });
    },  //获取验证码

    //获取验证码倒计时
    ShowCountDownMobile: function () {
        if (EIMS_C_40005_1.Config.ShutDownTemp <= 0) {
            $("#EIMS_C_40005_1_GetCheckCode").removeAttr("disabled");
            $("#EIMS_C_40005_1_MobileTxt").removeAttr("disabled");
            $("#EIMS_C_40005_1_GetCheckCode").val("获取验证码");

            return false;
        }

        $("#EIMS_C_40005_1_GetCheckCode").attr("disabled", "disabled");
        $("#EIMS_C_40005_1_MobileTxt").attr("disabled", "disabled");
        $("#EIMS_C_40005_1_GetCheckCode").val(" " + EIMS_C_40005_1.Config.ShutDownTemp + " 秒 ");

        EIMS_C_40005_1.Config.ShutDownTemp--;
        setTimeout(EIMS_C_40005_1.ShowCountDownMobile, 1000);
    },  //倒计时

    CheckCheckCode: function (obj) {
        $("#EIMS_C_40005_1_GetCheckCode").next("#EIMS_C_40005_1_mobilePrompt").text("");
        $("#EIMS_C_40005_1_InputCheckCode").next("#EIMS_C_40005_1_CodePrompt").text("");

        var code = $("#EIMS_C_40005_1_InputCheckCode").val();  //验证码
        var val = $("#EIMS_C_40005_1_MobileTxt").val();    //手机号

        if (!EIMS_C_40005_1.CheckMobile()) {
            return false;
        }

        if (IsNullOrEmpty(code)) {
            $("#EIMS_C_40005_1_InputCheckCode").next("#EIMS_C_40005_1_CodePrompt").text("验证码不能为空！");
            return;
        }

        if (code.length < 3) {
            $("#EIMS_C_40005_1_InputCheckCode").next("#EIMS_C_40005_1_CodePrompt").text("验证码不匹配！");
            return;
        }

        var keyValues = { mobile: val, checkcode: code, seekPwdWay: "mobile" };

        AjaxMethod("User", "CheckMobileCheckCode", keyValues, function (data) {
            if (data.result != 1) {
                $(obj).next("#EIMS_C_40005_1_pwdPrompt").text(data.msg);
                return false;
            }

            //验证成功，跳转
            document.location.href = MergeUrlParas(EIMS_C_40005_1.Config.SetPwdUrl, true, [], []);
        });
    }   //校验验证码
}
/*end_xn_mc_getpass_2_wrap*/

/*xn_mc_getchapass_1_wrap*/
/*2015-01-09*/
$(function () {
    try {
        if ($("#EIMS_C_40006_1_Panel").length > 0) {
            EIMS_C_40006_1.Init();
        }
    } catch (error) { }
});

var EIMS_C_40006_1 = {

    Init: function () {
        $("#EIMS_C_40006_1_ErrorPwd").text("");
        $("#EIMS_C_40006_1_ErrorConfirmPwd").text("");
    },

    CheckPwd: function () {
        var pwd = $("#EIMS_C_40006_1_Pwd").val();

        if (IsNullOrEmpty(pwd)) {
            $("#EIMS_C_40006_1_ErrorPwd").text("密码不能为空！");
            return false;
        } else if (pwd.length < 6) {
            $("#EIMS_C_40006_1_ErrorPwd").text("密码长度不能小于6位！");
            return false;
        } else {
            $("#EIMS_C_40006_1_ErrorPwd").text("");
        }

        return true;
    },

    CheckConfirmPwd: function () {
        var pwd = $("#EIMS_C_40006_1_Pwd").val();
        var pwd2 = $("#EIMS_C_40006_1_PwdConfirm").val();

        if (IsNullOrEmpty(pwd2)) {
            $("#EIMS_C_40006_1_ErrorConfirmPwd").text("确认密码不能为空！");
            return false;
        }
        else if (pwd2.length < 6) {
            $("#EIMS_C_40006_1_ErrorConfirmPwd").text("确认密码不能小于6位！");
            return false;
        }
        else if (pwd != pwd2) {
            $("#EIMS_C_40006_1_ErrorConfirmPwd").text("两次密码不一致！");
            return false;
        }else{
            $("#EIMS_C_40006_1_ErrorConfirmPwd").text("");
        }

        return true;
    },

    IsEmptyCheck: function () {
        if (!EIMS_C_40006_1.CheckPwd()) {
            return false;
        }

        if (!EIMS_C_40006_1.CheckConfirmPwd()) {
            return false;
        }
    }
}

$(function(){
    var oFirsName=$(".xn_mc_getchapass_1_getchw .EIMS_C_40006_1_TitleName");
    var oFirsInput=$(".xn_mc_getchapass_1_getchw").find("input");
    oFirsName.html("请输入新密码");
    oFirsInput.focus(function(){
        oFirsName.hide();
    });

    oFirsInput.blur(function(){
        if (oFirsInput.val().length==0) {
            oFirsName.show();
        };
    });

    var oSecName=$(".xn_mc_getchapass_1_pasdw .EIMS_C_40006_1_TitleName");
    var oSecInput=$(".xn_mc_getchapass_1_pasdw").find("input");
    oSecName.html("请确认新密码");
    oSecInput.focus(function(){
        oSecName.hide();
    });

    oSecInput.blur(function(){
        if (oSecInput.val().length==0) {
            oSecName.show();
        };
    });
});
/*end_xn_mc_getchapass_1_wrap*/

/*xn_mc_member_1_wrap*/
/*2015-01-16*/
$(function () {
    try {
        if ($("#EIMS_C_40015_1_Panel").length < 1) {
            return;
        }

        EIMS_C_40015_1.Init();
    } catch (error) { }
});

var EIMS_C_40015_1 = {
    Config: {
        SendTime: null, //服务器与本机的时间间隔
        ShutDownTime: 60, //获取验证码的倒计时（单位：s） 可自定义
        ShutDownTemp: 0, //倒计时时变化的时间
        RadioSexValue: 1,
        ProvinceArray: [],
        CityArray: [],
        AreaArray: [],
        SelectedProvince: 1, //初始化绑定北京市 1
        SelectedCity: 1, //初始化绑定市辖区 1
        SelectedArea: 1 //初始化绑定东城区 1
    }, //配置项

    Init: function () {
        EIMS_C_40015_1.RadioCheck();

        if ($("#EIMS_C_40015_1_selectProvince").length > 0 || $("#EIMS_C_40015_1_selectCity").length > 0 || $("#EIMS_C_40015_1_selectCounty").length > 0) {
            try {
                if (nations) {
                    EIMS_C_40015_1.BindCPCA();
                    EIMS_C_40015_1.SelectedAreaFun();
                }
            } catch (err) {
                $.ajaxSetup({ cache: true });
                $.getScript("/Js/ChinaArea.js").done(function () {
                    EIMS_C_40015_1.BindCPCA();
                    EIMS_C_40015_1.SelectedAreaFun();
                }).fail(function () {

                });
            }

            //绑定省下拉框的改变事件
            $("#EIMS_C_40015_1_selectProvince").bind("change", function () {
                EIMS_C_40015_1.GetCity($("#EIMS_C_40015_1_selectProvince").val());
            });

            //绑定市下拉框的改变事件
            $("#EIMS_C_40015_1_selectCity").bind("change", function () {
                EIMS_C_40015_1.GetArea($("#EIMS_C_40015_1_selectCity").val());
            });
        }

        //获取生日
        if ($("#EIMS_C_40015_1_Birthday").length > 0) {
            try {
                if (WdatePicker) $("#EIMS_C_40015_1_Birthday").click(WdatePicker({ dateFmt: 'yyyy-MM-dd' }));
            } catch (err) {
                $.ajaxSetup({ cache: true });
                $.getScript("/Admin/JScript/My97DatePicker/WdatePicker.js").done(function () {
                    $("#EIMS_C_40015_1_Birthday").click(function () { WdatePicker({ dateFmt: 'yyyy-MM-dd' }) });
                }).fail(function () {

                });
            }
        }

        if (IsNullOrEmpty($("#EIMS_C_40015_1_Mobile").val())) {
            $("#EIMS_C_40015_1_mobileDiv").find("em").hide();
        }

        if (IsNullOrEmpty($("#EIMS_C_40015_1_Email").val())) {
            $("#EIMS_C_40015_1_emailDiv").find("em").hide();
        }

        //弹出手机验证框
        $("#EIMS_C_40015_1_BindMobile").click(function () {
            if ($("#EIMS_C_40015_1_MobilePanel").length == 0) {
                return;
            }

            $("#EIMS_C_40015_1_tMobile").attr("disabled", "disabled");
            var htmlmobile = $("#EIMS_C_40015_1_MobilePanel").html();

            $("#EIMS_C_40015_1_MobilePanel").show();
            $("#EIMS_C_40015_1_TransparentLayer").show();
            $("#EIMS_C_40015_1_mobileAlert").hide();

            $("#EIMS_C_40015_1_mobileClose").click(function () {
                $("#EIMS_C_40015_1_MobilePanel").hide();
                $("#EIMS_C_40015_1_TransparentLayer").hide();
            });

            $("#EIMS_C_40015_1_MobilePanel").html();
        });

        //弹出邮箱验证框
        $("#EIMS_C_40015_1_BindEmail").click(function () {
            if ($("#EIMS_C_40015_1_EmailPanel").length == 0) {
                return;
            }

            $("#EIMS_C_40015_1_tEmail").attr("disabled", "disabled");
            var htmlmobile = $("#EIMS_C_40015_1_EmailPanel").html();

            $("#EIMS_C_40015_1_EmailPanel").show();
            $("#EIMS_C_40015_1_TransparentLayer").show();

            $("#EIMS_C_40015_1_ConfirmClose").click(function () {
                $("#EIMS_C_40015_1_EmailPanel").hide();
                $("#EIMS_C_40015_1_TransparentLayer").hide();
            });

            $("#EIMS_C_40015_1_EmailPanel").html();
        });

        //为手机号表单添加“data_mobile”属性
        $("#EIMS_C_40015_1_Mobile").attr("data_mobile", $("#EIMS_C_40015_1_Mobile").val());

        //为邮箱账号表单添加“data_email”属性
        $("#EIMS_C_40015_1_Email").attr("data_email", $("#EIMS_C_40015_1_Email").val());


        $("#EIMS_C_40015_1_Mobile").blur(function () {
            if (EIMS_C_40015_1.IsMobile('EIMS_C_40015_1_')) {
                EIMS_C_40015_1.IsExitMobile();
            }
        });

        $("#EIMS_C_40015_1_Email").blur(function () {
            if (EIMS_C_40015_1.IsEmail('EIMS_C_40015_1_')) {
                EIMS_C_40015_1.IsExitEmail();
            }
        });
    }, //初始化

    /* 省市区绑定开始 */
    BindCPCA: function () {
        if (IsNullOrEmpty(nations)) {
            return;
        }

        var pros = nations[0].provinces;

        $(pros).each(function (i, p) {
            var pArray = [p.pId, p.pn, p.p_en]; //省信息
            EIMS_C_40015_1.Config.ProvinceArray[EIMS_C_40015_1.Config.ProvinceArray.length] = pArray;

            $(p.cities).each(function (j, c) {
                var cArray = [p.pId, c.cId, c.cn, c.c_en];
                EIMS_C_40015_1.Config.CityArray[EIMS_C_40015_1.Config.CityArray.length] = cArray;

                $(c.areas).each(function (k, a) {
                    var aArray = [p.pId, c.cId, a.aId, a.an, a.a_en];

                    EIMS_C_40015_1.Config.AreaArray[EIMS_C_40015_1.Config.AreaArray.length] = aArray;
                });
            });
        });

        EIMS_C_40015_1.GetProvince();

    }, //保存省、市、区信息

    GetProvince: function () {
        $("#EIMS_C_40015_1_selectProvince").find("option").remove();
        var province = EIMS_C_40015_1.Config.ProvinceArray;
        for (var i = 0; i < province.length; i++) {
            $("#EIMS_C_40015_1_selectProvince").append("<option value='" + province[i][0] + "'>" + province[i][1] + "</option>");
        }
        //县
        EIMS_C_40015_1.Config.SelectedProvince = $("#EIMS_C_40015_1_hidProvince").val();
        $("#EIMS_C_40015_1_selectProvince").val($("#EIMS_C_40015_1_hidProvince").val());

        EIMS_C_40015_1.GetCity($("#EIMS_C_40015_1_selectProvince").val());

    }, //加载省数据

    GetCity: function (provinceID) {
        $("#EIMS_C_40015_1_selectCity").find("option").remove();
        var city = EIMS_C_40015_1.Config.CityArray;
        for (var i = 0; i < city.length; i++) {
            if (city[i][0] == provinceID) {
                $("#EIMS_C_40015_1_selectCity").append("<option value='" + city[i][1] + "'>" + city[i][2] + "</option>");
            }
        }

        EIMS_C_40015_1.Config.SelectedCity = $("#EIMS_C_40015_1_hidCity").val()
        $("#EIMS_C_40015_1_selectCity").val($("#EIMS_C_40015_1_hidCity").val());

        EIMS_C_40015_1.GetArea($("#EIMS_C_40015_1_selectCity").val());

    }, //加载城市数据

    GetArea: function (cityID) {
        $("#EIMS_C_40015_1_selectCounty").find("option").remove();
        var area = EIMS_C_40015_1.Config.AreaArray;

        for (var i = 0; i < area.length; i++) {
            if (area[i][1] == cityID) {
                $("#EIMS_C_40015_1_selectCounty").append("<option value='" + area[i][2] + "'>" + area[i][3] + "</option>");
            }
        }

        EIMS_C_40015_1.Config.SelectedArea = $("#EIMS_C_40015_1_hidArea").val();
        $("#EIMS_C_40015_1_selectCounty").val(EIMS_C_40015_1.Config.SelectedArea);
    }, //加载区域数据

    SelectedAreaFun: function () {
        //选择的省
        $("#EIMS_C_40015_1_selectProvince").change(function () {
            $(this).find("option[value='" + $(this).val() + "']").attr("selected", "selected");
            EIMS_C_40015_1.Config.SelectedProvince = $(this).find("option[value='" + $(this).val() + "']").attr("selected", "selected").val();
        });

        //选择的市
        $("#EIMS_C_40015_1_selectCity").change(function () {
            $(this).find("option[value='" + $(this).val() + "']").attr("selected", "selected");
            EIMS_C_40015_1.Config.SelectedCity = $(this).find("option[value='" + $(this).val() + "']").attr("selected", "selected").val();
        });

        //选择的区、县
        $("#EIMS_C_40015_1_selectCounty").change(function () {
            $(this).find("option[value='" + $(this).val() + "']").attr("selected", "selected");
            EIMS_C_40015_1.Config.SelectedArea = $(this).find("option[value='" + $(this).val() + "']").attr("selected", "selected").val();
        });
    }, //下拉框
    /* 省市区绑定结束 */

    RadioCheck: function () {
        EIMS_C_40015_1.Config.RadioSexValue = $("#EIMS_C_40015_1_hidSex").val();

        if (EIMS_C_40015_1.Config.RadioSexValue == "0") {
            $("#EIMS_C_40015_1_sexRadio input[name='tRadio'][value='0']").attr("checked", "checked");
        }

        $("#EIMS_C_40015_1_sexRadio input").change(function (obj) {
            EIMS_C_40015_1.Config.RadioSexValue = $(this).attr("value");
        });
    }, //Radio 标签，性别选择

    /* 发送手机验证开始 */
    ActiveMobile: function () {
        //验证手机验证码的非空验证
        if (!EIMS_C_40015_1.IsMobile("EIMS_C_40015_1_")) {
            return false;
        }

        //当前输入的手机号
        var vmobile = $("#EIMS_C_40015_1_tMobile").val();
        var checkCode = $("#EIMS_C_40015_1_MobileCode").val();

        AjaxMethod("User", "ValidMobile", {
            "mobile": vmobile,
            "checkcode": checkCode,
            "type": 1
        }, function (data) {
            if (IsNullOrEmpty(data)) {
                return false;
            }

            if (data.result == 0) {
                $("#EIMS_C_40015_1_MobileCodePrompt").text(data.msg);
                return false
            }

            alert("恭喜你，激活成功！");

            document.location.reload();
            $("#EIMS_C_40015_1_MobilePanel").show(); //隐藏手机验证弹出层

            //激活成功后显示不可用按钮，隐藏可用按钮
            $("#EIMS_C_40015_1_VerityMobileDis").show();
            $("#EIMS_C_40015_1_VerityMobile").hide();
        });
    }, //验证(激活)手机

    //手机，验证码输入框的非空验证
    VerifyMobile: function () {
        if (!EIMS_C_40015_1.IsMobile("EIMS_C_40015_1_")) {
            return false;
        }

        if ($("#EIMS_C_40015_1_MobileCode").val() == "") {
            $("#EIMS_C_40015_1_MobileCodePrompt").text("请输入您手机接收到的验证码！");
            return false;
        }

        return true;
    },

    //发送手机验证码
    SendCodeMobile: function () {
        if (!EIMS_C_40015_1.IsMobile("EIMS_C_40015_1_")) {
            return false;
        }

        var vmobile = $("#EIMS_C_40015_1_tMobile").val();
        AjaxMethod("User", "SendMobileCode", { "mobile": vmobile, type: 0 }, function (data) {
            if (IsNullOrEmpty(data)) {
                return false;
            }

            if (data.result == 0) {
                $("#EIMS_C_40015_1_MobileCodePrompt").text(data.msg);
                return false;
            }

            $("#EIMS_C_40015_1_MobileCodePrompt").text("");
            $("#EIMS_C_40015_1_tMobile").attr("disabled", "disabled");

            $("#EIMS_C_40015_1_mobileAlert").show();

            EIMS_C_40015_1.Config.ShutDownTemp = EIMS_C_40015_1.Config.ShutDownTime;
            EIMS_C_40015_1.ShowCountDownMobile();

            var tipTime = EIMS_C_40015_1.Config.ShutDownTime / 60;
            $("#EIMS_C_40015_1_mobileTipTime").html(tipTime);
        });
    },

    //获取手机验证码倒计时
    ShowCountDownMobile: function () {
        if (EIMS_C_40015_1.Config.ShutDownTemp <= 0) {
            $("#EIMS_C_40015_1_SendMobile").removeAttr("disabled");
            $("#EIMS_C_40015_1_tMobile").removeAttr("disabled");
            $("#EIMS_C_40015_1_SendMobile").val("点击获取验证码");
            $("#EIMS_C_40015_1_mobileAlert").hide();

            return false;
        }

        $("#EIMS_C_40015_1_SendMobile").attr("disabled", "disabled");
        $("#EIMS_C_40015_1_tMobile").attr("disabled", "disabled");
        $("#EIMS_C_40015_1_SendMobile").val(" " + EIMS_C_40015_1.Config.ShutDownTemp + " 秒 ");

        EIMS_C_40015_1.Config.ShutDownTemp--;
        setTimeout(EIMS_C_40015_1.ShowCountDownMobile, 1000);

    },
    /* 发送手机验证结束 */

    //发送邮箱验证码
    SendVerifyEmail: function () {
        if (!EIMS_C_40015_1.IsEmail("EIMS_C_40015_1_")) {
            return false;
        }

        var vemail = $("#EIMS_C_40015_1_tEmail").val();

        var linkUrl = MergeUrlParas(null, false, [], []);

        AjaxMethod("User", "SendVerifyEmail", {
            "email": vemail,
            "url": linkUrl
        }, function (data) {
            if (IsNullOrEmpty(data)) {
                return false;
            }

            if (data.result != 1) {
                alert(data.msg);
                return false;
            }

            $("#EIMS_C_40015_1_tEmail").attr("disabled", "disabled");

            EIMS_C_40015_1.Config.ShutDownTemp = EIMS_C_40015_1.Config.ShutDownTime;
            EIMS_C_40015_1.ShowCountDownEmail();

            var tipTime = EIMS_C_40015_1.Config.ShutDownTime / 60;
        });
    },

    //获取验证码倒计时
    ShowCountDownEmail: function () {
        if (EIMS_C_40015_1.Config.ShutDownTemp <= 0) {
            $("#EIMS_C_40015_1_SendEmail").removeAttr("disabled");
            $("#EIMS_C_40015_1_tEmail").removeAttr("disabled");
            $("#EIMS_C_40015_1_SendEmail").val("发送验证邮件");

            return false;
        }

        $("#EIMS_C_40015_1_SendEmail").attr("disabled", "disabled");
        $("#EIMS_C_40015_1_tEmail").attr("disabled", "disabled");
        $("#EIMS_C_40015_1_SendEmail").val(" " + EIMS_C_40015_1.Config.ShutDownTemp + " 秒 ");

        EIMS_C_40015_1.Config.ShutDownTemp--;
        setTimeout(EIMS_C_40015_1.ShowCountDownEmail, 1000);
    },

    /* 发送验证邮箱结束 */

    IsMobile: function (tag) {
        var regularMobile = /^[1][3-9]\d{9}$/; //11位数字

        if (!IsNullOrEmpty($("#" + tag + "Mobile").val())) {
            if (!regularMobile.test($("#" + tag + "Mobile").val())) {
                $("#" + tag + "MobilePrompt").text(" 手机号格式不正确，请重新输入！");
                $("#" + tag + "BindMobile").text("");
                $("#" + tag + "ChangeMobile").text("");
                $("#" + tag + "Mobile").focus();

                return false;
            } else {
                $("#" + tag + "MobilePrompt").text("");
            }
        } else {
            $("#" + tag + "MobilePrompt").text(" 手机号不能为空！");
            $("#" + tag + "mobileDiv").find("span").html(" 手机号不能为空");
            $("#" + tag + "mobileDiv").find("em").hide();
            return false;
        }

        return true;
    }, //验证手机

    IsEmail: function (tag) {
        var regularEmail = /^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/;

        if (!IsNullOrEmpty($("#" + tag + "Email").val())) {
            if (!regularEmail.test($("#" + tag + "Email").val())) {
                $("#" + tag + "EmailPrompt").text(" 邮箱格式不正确，请重新输入！");

                $("#" + tag + "BindEmail").text("");
                $("#" + tag + "ChangeEmail").text("");
                $("#" + tag + "Email").focus();

                return false;
            } else {
                $("#" + tag + "EmailPrompt").text("");
            }
        } else {
            $("#" + tag + "EmailPrompt").html(" 邮箱不能为空！");
            $("#" + tag + "emailDiv").find("em").hide();
            return false;
        }

        return true;
    }, //验证邮箱

    IsExitMobile: function () {
        var mobile = $("#EIMS_C_40015_1_Mobile").val();

        //当输入的手机号与 “data_mobile”属性的值相同，则 “data_Checking”属性的值为 0，这时候可确定此手机号没有其他用户拥有，返回1
        if ($("#EIMS_C_40015_1_Mobile").attr("data_mobile") == mobile) {
            $("#EIMS_C_40015_1_MobilePrompt").text("");
            $("#EIMS_C_40015_1_Mobile").attr("data_Checking", "0");
            $("#EIMS_C_40015_1_Mobile").attr("data_exit", "0");
            return 1;
        }

        $("#EIMS_C_40015_1_Mobile").attr("data_exit", "1");
        $("#EIMS_C_40015_1_Mobile").attr("data_Checking", "1");

        AjaxMethod("User", "CheckMobileByUser", { "mobile": mobile }, function (data) {
            if (IsNullOrEmpty(data)) {
                return false;
            }

            if (data.result == -1) {
                $("#EIMS_C_40015_1_Mobile").attr("data_exit", "1");
                $("#EIMS_C_40015_1_MobilePrompt").text(" 手机号已存在,请重新输入！");
                $("#EIMS_C_40015_1_BindMobile").text("");
                $("#EIMS_C_40015_1_ChangeMobile").text("");
            } else {
                $("#EIMS_C_40015_1_Mobile").attr("data_exit", "0");
            }

            $("#EIMS_C_40015_1_Mobile").attr("data_Checking", "0"); //手机号校验完成，可提交个人资料
        });

        $("#EIMS_C_40015_1_MobilePrompt").text(" ");
        $("#EIMS_C_40015_1_BindMobile").text("");
        $("#EIMS_C_40015_1_ChangeMobile").text("");
        return 2; //手机号正在校验中
    }, //非弹出层验证手机号是否存在

    IsExitEmail: function () {
        var email = $("#EIMS_C_40015_1_Email").val();

        //当输入的邮箱账号与 “data_email”属性的值相同，则 “data_Checking”属性的值为 0，这时候可确定此手机号没有其他用户拥有，返回1
        if ($("#EIMS_C_40015_1_Email").attr("data_email") == email) {
            $("#EIMS_C_40015_1_EmailPrompt").text("");
            $("#EIMS_C_40015_1_Email").attr("data_Checking", "0");
            $("#EIMS_C_40015_1_Email").attr("data_exit", "0");
            return 1;
        }

        $("#EIMS_C_40015_1_Email").attr("data_exit", "1");
        $("#EIMS_C_40015_1_Email").attr("data_Checking", "1"); //校验通过

        //邮箱
        AjaxMethod("User", "CheckMailByUser", { "email": email }, function (data) {
            if (IsNullOrEmpty(data)) {
                return false;
            }

            $("#EIMS_C_40015_1_Email").attr("data_exit", data.result);

            if (data.result == -1) {
                $("#EIMS_C_40015_1_Email").attr("data_exit", "1");
                $("#EIMS_C_40015_1_EmailPrompt").text(" 邮箱账号已存在,请重新输入！");
                $("#EIMS_C_40015_1_BindEmail").text("");
                $("#EIMS_C_40015_1_ChangeEmail").text("");
            } else {
                $("#EIMS_C_40015_1_Email").attr("data_exit", "0");
            }

            $("#EIMS_C_40015_1_Email").attr("data_Checking", "0"); //校验完成，可以提交成功
        });

        $("#EIMS_C_40015_1_EmailPrompt").text(" ");
        $("#EIMS_C_40015_1_BindEmail").text("");
        $("#EIMS_C_40015_1_ChangeEmail").text("");
        return 2; //邮箱账号正在校验中

    }, //非弹出层验证邮箱是否存在

    SubmitCheck: function () {
        if (!EIMS_C_40015_1.IsMobile("EIMS_C_40015_1_")) {
            return false;
        }

        if (!EIMS_C_40015_1.IsEmail("EIMS_C_40015_1_")) {
            return false;
        }

        //验证手机号是否存在
        var isChecking = $("#EIMS_C_40015_1_Mobile").attr("data_Checking");
        if (isChecking == 1) {
            $("#EIMS_C_40015_1_MobilePrompt").text(" 正在提交，请等待！");
            $("#EIMS_C_40015_1_Mobile").focus();

            return false;
        }
        if ($("#EIMS_C_40015_1_Mobile").attr("data_exit") == "1") {
            $("#EIMS_C_40015_1_Mobile").focus();
            $("#EIMS_C_40015_1_MobilePrompt").text(" 手机号已存在,请重新输入！");
            return false;
        } else if ($("#EIMS_C_40015_1_Mobile").attr("data_exit") == "0") {
            $("#EIMS_C_40015_1_Mobile").attr("data_exit", "0");
        }

        //验证邮箱账号是否存在
        var isChecking = $("#EIMS_C_40015_1_Email").attr("data_Checking");
        if (isChecking == 1) {
            $("#EIMS_C_40015_1_EmailPrompt").text(" 正在提交，请等待！");
            $("#EIMS_C_40015_1_Email").focus();

            return false;
        }
        if ($("#EIMS_C_40015_1_Email").attr("data_exit") == "1") {
            $("#EIMS_C_40015_1_Email").focus();
            $("#EIMS_C_40015_1_EmailPrompt").text(" 邮箱账号已存在,请重新输入！");
            return false;
        } else if ($("#EIMS_C_40015_1_Email").attr("data_exit") == "0") {
            $("#EIMS_C_40015_1_Email").attr("data_exit", "0");
        }

        //验证昵称
        if (IsNullOrEmpty($("#EIMS_C_40015_1_reallyName").val())) {
            $("#EIMS_C_40015_1_Name").find("span").html(" 昵称不能为空");
            return false;
        } else if ($("#EIMS_C_40015_1_reallyName").val().length < 4) {
            $("#EIMS_C_40015_1_Name").find("span").html(" 昵称不能小于4位");
            return false;
        }
        else {
            $("#EIMS_C_40015_1_Name").find("span").html("");
        }

        //验证固定电话
        var regularTelePhone = /^(0[0-9]{2,3}\-)?([2-9][0-9]{6,7})$/; // /^(0[0-9]{2,3}\-)?([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$/; //区号+座机号码+分机号码
        if (!IsNullOrEmpty($("#EIMS_C_40015_1_telePhone").val())) {
            if (!regularTelePhone.test($("#EIMS_C_40015_1_telePhone").val())) {
                $("#EIMS_C_40015_1_telDiv").find("span").html(" 固定电话格式不正确，应为:区号+座机号码！");
                $("#EIMS_C_40015_1_telePhone").focus();
                return false;
            } else {
                $("#EIMS_C_40015_1_telDiv").find("span").html("");
            }
        }

        return true;
    }, //提交资料非空验证

    SubmitInfo: function () {
        var name = $("#EIMS_C_40015_1_reallyName").val();
        var mobile = $("#EIMS_C_40015_1_Mobile").val();
        var telePhone = $("#EIMS_C_40015_1_telePhone").val();
        var email = $("#EIMS_C_40015_1_Email").val();
        var birthday = $("#EIMS_C_40015_1_Birthday").val();
        var qq = $("#EIMS_C_40015_1_qq").val();
        var address = $("#EIMS_C_40015_1_Address").val();
        var postCode = $("#EIMS_C_40015_1_postCode").val();

        if (!EIMS_C_40015_1.SubmitCheck()) {
            return false;
        }

        EIMS_C_40015_1.SelectedAreaFun();

        var userInfoData = {
            Name: name,
            Sex: EIMS_C_40015_1.Config.RadioSexValue,
            Mobile: mobile,
            telePhone: telePhone,
            Email: email,
            Birthday: birthday, QQ: qq,
            Province: EIMS_C_40015_1.Config.SelectedProvince,
            City: EIMS_C_40015_1.Config.SelectedCity,
            Area: EIMS_C_40015_1.Config.SelectedArea,
            deAddress: address,
            postCode: postCode
        };

        AjaxMethod("User", "Update", userInfoData, function (data) {
            if (IsNullOrEmpty(data)) {
                return;
            }

            if (data.result == 1) {
                alert(data.msg);
                document.location.reload();
            } else {
                alert(data.msg);
                return;
            }
        });
    } //提交更改
}
/*end_xn_mc_member_1_wrap*/


/*xn_mc_changepass_1_wrap*/
/*2015-01-20*/
$(function () {
    try {
        if ($("#EIMS_C_40016_1_Panel").length < 1) {
            return;
        }

        EIMS_C_40016_1.Init();
    } catch (err) { }
});

var EIMS_C_40016_1 = {
    Init: function () {
        $("#EIMS_C_40016_1_ErrorPwd").text("");
        $("#EIMS_C_40016_1_ErrorConfirmPwd").text("");
        $("#EIMS_C_40016_1_ErrorPwdOld").text("");
    },

    CheckOldPwd: function () {
        var pwdOld = $("#EIMS_C_40016_1_pwdOld").val();

        if (IsNullOrEmpty(pwdOld)) {
            $("#EIMS_C_40016_1_ErrorPwdOld").text("旧密码不能为空！");
            return false;
        } else if (pwdOld.indexOf(" ") >= 0) {
            $("#EIMS_C_40016_1_ErrorPwdOld").text("密码不能包含空格！");
            return false;
        } else {
            $("#EIMS_C_40016_1_ErrorPwdOld").text("");
        }

        return true;
    },

    CheckPwd: function () {
        var pwd = $("#EIMS_C_40016_1_Pwd").val();

        if (IsNullOrEmpty(pwd)) {
            $("#EIMS_C_40016_1_ErrorPwd").text("密码不能为空！");
            return false;
        } else if (pwd.indexOf(" ") >= 0) {
            $("#EIMS_C_40016_1_ErrorPwd").text("密码不能包含空格！");
            return false;
        } else if (pwd.length < 6 && pwd.length > 20) {
            $("#EIMS_C_40016_1_ErrorPwd").text("密码长度应在6-20位之间！");
            return false;
        } else {
            $("#EIMS_C_40016_1_ErrorPwd").text("");
        }

        return true;
    },

    CheckConfirmPwd: function () {
        var pwd = $("#EIMS_C_40016_1_Pwd").val();
        var pwd2 = $("#EIMS_C_40016_1_PwdConfirm").val();

        if (IsNullOrEmpty(pwd2)) {
            $("#EIMS_C_40016_1_ErrorConfirmPwd").text("确认密码不能为空！");
            return false;
        }
        else if (pwd2.length < 6) {
            $("#EIMS_C_40016_1_ErrorConfirmPwd").text("确认密码不能小于6位！");
            return false;
        }
        else if (pwd != pwd2) {
            $("#EIMS_C_40016_1_ErrorConfirmPwd").text("两次密码不一致！");
            return false;
        } else {
            $("#EIMS_C_40016_1_ErrorConfirmPwd").text("");
        }

        return true;
    },

    IsEmptyCheck: function () {
        if (!EIMS_C_40016_1.CheckOldPwd()) {
            return false;
        }

        if (!EIMS_C_40016_1.CheckPwd()) {
            return false;
        }

        if (!EIMS_C_40016_1.CheckConfirmPwd()) {
            return false;
        }
    }
}
/*end_xn_mc_changepass_1_wrap*/

/*xn_mh_4_wrap*/
/* EIMS_C_50000 V1.0 Date:2015/04/20 begin */
$ && $(function () {
    try {
        if ($("#EIMS_C_50000_Panel").length > 0) {
            EIMS_C_50000.Init();
        }
    } catch (err) { }
});

var EIMS_C_50000 = {
    Config: {
        LoginPage: "/m/login.aspx",    //登录页面
        RegisterPage: "/m/reg.aspx"    //注册页面
    },
    Init: function () {
        AjaxMethod("User", "IsLogin", null, function (data) {
            if (data && data.result == 1) {
                $("#EIMS_C_50000_loginedName").html(data.msg.name);
                $("#EIMS_C_50000_Logined").show();
                $("#EIMS_C_50000_Normal").hide();
            } else {
                $("#EIMS_C_50000_LoginLink").attr("href", EIMS_C_50000.Config.LoginPage);
                $("#EIMS_C_50000_RegisterLink").attr("href", EIMS_C_50000.Config.RegisterPage);
                $("#EIMS_C_50000_Normal").show();
            }
        });
    }
}
/* EIMS_C_50000 end */
/*end_xn_mh_4_wrap*/

/*xn_mh_5_wrap*/
/* EIMS_C_50005 Start */

$(function () {
    try {
        if ($("#EIMS_C_50005_Panel").length > 0) {
            EIMS_C_50005.Init();
        }
    } catch (err) { alert(err); }
});

var EIMS_C_50005 = {
    Config: {
        ToShopCartUrl: "/m/spcstep1.aspx" //点击"购物车"跳转的页面
    },

    Init: function () {
        EIMS_C_50005.InitCartList();
        $("#EIMS_C_50005_Panel").click(function () {
            window.location.href = EIMS_C_50005.Config.ToShopCartUrl;
        });
    },

    InitCartList: function () {
        AjaxMethod("ShoppingCart", "Get", null, function (data) {
            if (IsNullOrEmpty(data)) {
                return;
            }
            var cartItems = data.msg;
            $("#EIMS_C_50005_Count").text(cartItems.length);
        });
    }
}
//EIMS_C_50005 End
/*end_xn_mh_5_wrap*/

/*xn_mc_products_17_wrap*/
/* EIMS_C_50006 Start */
$(function () {
    try {
        if ($("#EIMS_C_50006_Panel").length > 0) {
            EIMS_C_50006.Init();
        }
    } catch (error) { }
});

var EIMS_C_50006 = {
    Config: {
        AscClass: "EIMS_C_50006_asc",  //升序样式
        DescClass: "EIMS_C_50006_desc",       //降序样式
        SelectedClass: "EIMS_C_50006_orderby", //选中样式
        ShowShoppingCart: true,    //是否显示购物车按钮
        PositiveStock: 0,    //为1时仅显示库存大于0的商品
        ProductDetailPage: "/m/prod_view.aspx"    //商品详情页
    }, //配置项

    Init: function () {
        if (!EIMS_C_50006.Config.ShowShoppingCart) {
            $(".EIMS_C_50006_product_cart").hide();
        }

        var th = $(window).height() - $(".EIMS_C_50006_header").height() - $(".EIMS_C_50006_filter").height();
        var lih = 100;
        var pagesize = Math.ceil(th / lih);
        $.extend(EIMS_C_50006.Config, { "PageIndex": 1, "PageSize": pagesize });

        EIMS_C_50006.InitFilters();
        EIMS_C_50006.LoadData();
        EIMS_C_50006.BindEvents();

        AjaxMethod("Product", "GetAllProductTypes", null, function (data) {
            if (data && data.result == 1) {
                var menuHtml = "";
                $.each(data.msg, function (i, val) {
                    menuHtml += EIMS_C_50006.BuildMenuHtml(val);
                });
                $(".EIMS_C_50006_slidbar-inner").html(menuHtml);

                //追加类别焦点样式
                var slidbar_len = $(".EIMS_C_50006_slidbar");
                if(slidbar_len.length > 0){
                    //筛选&后面名称的值
                    function searchParse() {
                        var resultObj = {};
                        var search = window.location.search;
                        if (search && search.length > 1) {
                            var search = search.substring(1);
                            var items = search.split('&');
                            for ( var index = 0; index < items.length; index++) {
                                if (!items[index]) {
                                    continue;
                                }
                                var kv = items[index].split('=');
                                resultObj[kv[0]] = typeof kv[1] === "undefined" ? "" : kv[1];
                            }
                        }
                        return resultObj;
                    }
                    //接收跳转之后参数值对li进行定位
                    var searchObj = searchParse();
                    var typeId_val = searchObj["typeId"];
                    slidbar_len.find("li").each(function(){
                        if ($(this).attr("data-id") == typeId_val) {
                            var level_val = $(this).attr("data-level");
                            if(level_val == "1"){
                                $(this).addClass("EIMS_C_50006_cur1");
                            }else if(level_val == "2"){
                                $(this).addClass("EIMS_C_50006_cur2");
                                $(this).prev().addClass("EIMS_C_50006_cur1");
                            }else{
                                $(this).addClass("EIMS_C_50006_cur3");
                                $(this).prev().addClass("EIMS_C_50006_cur2");
                                $(this).prev().prev().addClass("EIMS_C_50006_cur1");
                            }
                        }
                    });
                }

                $(".EIMS_C_50006_pro-type").on("click", function () {
                    var typeId = $(this).attr("data-id");
                    document.location.href = MergeUrlParas(null, true, ["typeId"], [typeId]);
                });
            }
        });
    },

    BuildMenuHtml: function (type) {
        var html = "<li class=EIMS_C_50006_pro-type data-level=" + type.Hierarchy + " data-id=" + type.Id + ">" + type.Name + "</li>";
        if (type.Sub) {
            $.each(type.Sub, function (i, val) {
                html += EIMS_C_50006.BuildMenuHtml(val);
            });
        }
        return html;
    },

    InitFilters: function () {
        var typeId = QueryString("typeId");
        var order = QueryString("order");
        var p1 = QueryString("p1");
        var p2 = QueryString("p2");

        //排序
        switch (order) {
            case null:
                $(".EIMS_C_50006_rank>div[data-order=default]").addClass(EIMS_C_50006.Config.SelectedClass);
                break;
            case "1":
                $(".EIMS_C_50006_rank>div[data-order=price]").addClass(EIMS_C_50006.Config.DescClass).addClass(EIMS_C_50006.Config.SelectedClass);
                break;
            case "2":
                $(".EIMS_C_50006_rank>div[data-order=price]").addClass(EIMS_C_50006.Config.AscClass).addClass(EIMS_C_50006.Config.SelectedClass);
                break;
            case "3":
                $(".EIMS_C_50006_rank>div[data-order=sales]").addClass(EIMS_C_50006.Config.DescClass).addClass(EIMS_C_50006.Config.SelectedClass);
                break;
            case "4":
                $(".EIMS_C_50006_rank>div[data-order=new]").addClass(EIMS_C_50006.Config.DescClass).addClass(EIMS_C_50006.Config.SelectedClass);
                break;
            default:
                break;
        }

        $(".EIMS_C_50006_pro-type[data-id=" + typeId + "]").addClass("EIMS_C_50006_selected");

        //属性
        if (!IsNullOrEmpty(p1)) {
            var ids = p1.split(',');
            for (var i = 0; i < ids.length; i++) {
                var childNode = $(".EIMS_C_50006_subfilter").find("span[data-id=" + ids[i] + "]");
                var parentNode = $(".EIMS_C_50006_filter").find("span[data-id=" + childNode.attr("data-pid") + "]");
                parentNode.addClass("EIMS_C_50006_selected").text(childNode.text());
                childNode.addClass("EIMS_C_50006_selected");
            }
        }
        if (!IsNullOrEmpty(p2)) {
            var ids = p2.split(',');
            for (var i = 0; i < ids.length; i++) {
                var childNode = $(".EIMS_C_50006_subfilter").find("span[data-id=" + ids[i] + "]");
                var parentNode = $(".EIMS_C_50006_filter").find("span[data-id=" + childNode.attr("data-pid") + "]");
                parentNode.addClass("EIMS_C_50006_selected").text(childNode.text());
                childNode.addClass("EIMS_C_50006_selected");
            }
        }

    },

    BindEvents: function () {
        //左侧菜单
        $("#EIMS_C_50006_nav-toggle").on("click", function () {
            if ($(".EIMS_C_50006_slidbar").css("display") == "none") {
                $(".EIMS_C_50006_slidbar").slideDown();
                $("#EIMS_C_50006_nav-toggle").addClass("EIMS_C_50006_nav-toggle-on");
            } else {
                $(".EIMS_C_50006_slidbar").slideUp();
                $("#EIMS_C_50006_nav-toggle").removeClass("EIMS_C_50006_nav-toggle-on");
            }
        });

        //属性点击事件
        $(".EIMS_C_50006_filter-attr").on("click", function () {
            var attrId = $(this).attr("data-id");
            if ($(this).hasClass("EIMS_C_50006_on")) {
                $(this).removeClass("EIMS_C_50006_on");
                $(".EIMS_C_50006_filter-attr-value").hide();
                $(".EIMS_C_50006_subfilter").slideUp();
            } else {
                if ($(".EIMS_C_50006_filter-attr.EIMS_C_50006_on").length > 0) {
                    var temp = $(".EIMS_C_50006_filter-attr.EIMS_C_50006_on").attr("data-id");
                    $(".EIMS_C_50006_filter-attr.EIMS_C_50006_on").removeClass("EIMS_C_50006_on");
                    $(".EIMS_C_50006_filter-attr-value").hide();
                }
                $(this).addClass("EIMS_C_50006_on");
                $(".EIMS_C_50006_filter-attr-value:first").show();
                $(".EIMS_C_50006_filter-attr-value[data-pid=" + attrId + "]").css("display", "inline-block");
                $(".EIMS_C_50006_subfilter").slideDown();
            }
        });

        //属性值点击事件
        $(".EIMS_C_50006_filter-attr-value").on("click", function () {
            var p1 = "", p2 = "";    //p1商品属性，p2销售属性

            $(this).siblings(":visible").removeClass("EIMS_C_50006_selected");
            $(this).addClass("EIMS_C_50006_selected");

            $(".EIMS_C_50006_filter-attr-value.EIMS_C_50006_selected").each(function () {
                if ($(this).attr("data-type") == "1") {
                    p2 += "," + parseInt($(this).attr("data-id"));
                }
                else if ($(this).attr("data-type") == "2") {
                    p1 += "," + parseInt($(this).attr("data-id"));
                }
            });

            p1 = p1.replace(/^,/, "");
            p2 = p2.replace(/^,/, "");

            document.location.href = MergeUrlParas(null, false, ["p1", "p2","pageindex"], [p1, p2,""]);
        });

        $(".EIMS_C_50006_rank > div").on("click", function () {
            var clickOrder = $(this).attr("data-order");
            var currentOrder = QueryString("order");

            //1价格降序，2价格升序，3销量降序，4新品降序
            switch (clickOrder) {
                case "default":
                    order = "";
                    break;
                case "price":
                    if (currentOrder == 1) order = 2;
                    else order = 1;
                    break;
                case "sales":
                    order = 3;
                    break;
                case "new":
                    order = 4;
                    break;
                default:
                    break;
            }

            if (currentOrder == order) { return; }

            $(".EIMS_C_50006_orderby").removeClass("EIMS_C_50006_orderby");
            $(this).addClass("EIMS_C_50006_orderby");

            document.location.href = MergeUrlParas(null, false, ["order","pageindex"], [order,""]);

        });

        $(document).on("click", ".EIMS_C_50006_product_cart", function (e) {
            var productId = $(this).parent().attr("bindid");
            if (productId <= 0) {
                alert("无效的商品");
                return false;
            }
            var keyValues = { "productId": productId, "quantity": 1 };
            AjaxMethod("ShoppingCart", "AddProduct", keyValues, function (data) {
                if (data.result == 0) {
                    alert(EIMS_C_50006.Config.AddCartFailPrompt + ", 原因：" + data.msg);
                    return;
                }
                EIMS_C_50006.AnimatePlusOne(e);
                if ($("#EIMS_C_50005_Wrap").length > 0) {
                    EIMS_C_50005.Init();
                }
            });
        });

        $(window).scroll(function () {
            var bottom = 100; //bottom是底部距离的高度
            if ((bottom + $(window).scrollTop()) >= ($(document).height() - $(window).height())) {
                var oldIndex = EIMS_C_50006.Config.PageIndex++;
                EIMS_C_50006.LoadData();
            }
        });

    },

    LoadData: function () {
        var params = {
            typeid: QueryString("typeId"),
            page: EIMS_C_50006.Config.PageIndex,
            size: EIMS_C_50006.Config.PageSize,
            p1: QueryString("p1"),
            p2: QueryString("p2"),
            order: QueryString("order"),
            stock: EIMS_C_50006.Config.PositiveStock
        };
        AjaxMethod("Product", "MuiltConditionSearch", params, function (data) {
            if (data && data.result == 1) {
                EIMS_C_50006.AppendProducts(data.msg.products);
            }
        });
    },

    AppendProducts: function (json) {
        var html = "";
        if (IsNullOrEmpty(json)) {
            return;
        }
        for (var i = 0; i < json.length; i++) {
            html += "\<li class=EIMS_C_50006_product bindid=" + json[i].Id + ">\
                        <div class=EIMS_C_50006_product_img>\
                            <a href=" + EIMS_C_50006.Config.ProductDetailPage + "?id=" + json[i].Id + ">\
                                <img src='" + json[i].SmallImageUrl + "' alt=" + json[i].Name + ">\
                            </a>\
                        </div>\
                        <div class=EIMS_C_50006_product_info>\
                            <a href=" + EIMS_C_50006.Config.ProductDetailPage + "?id=" + json[i].Id + "><b>" + json[i].Name + "</b></a>\
                        <div class=EIMS_C_50007_PriceDiv>\
                            <span class=EIMS_C_50006_red>￥" + json[i].BuyPrice + "</span>\
                            <span class=EIMS_C_50006_linethrough>" + json[i].MarketPrice + "元</span></div></div>\
                        <div class=EIMS_C_50006_product_cart><img alt=加入购物车 src=http://1.rc.xiniu.com/rc/Mobiles/19040/images/Controls/shoppingcart.png></div></li>";
        }
        $(".EIMS_C_50006_products").append(html);
    },

    AnimatePlusOne: function (e) {
        var $i = $("<b>").text("+1");
        var x = e.pageX, y = e.pageY;
        $i.css({ top: y - 20, left: x, position: "absolute", color: "#E94F06" });
        $("body").append($i);
        $i.animate({ top: y - 180, opacity: 0, "font-size": "1.4em" }, 1500, function () {
            $i.remove();
        });
        e.stopPropagation();
    }
};
// EIMS_C_50006 End
/*end_xn_mc_products_17_wrap*/

/*xn_mc_prodv_31_wrap*/
/* EIMS_C_50007 Start */
$(function () {
    try {
        if ($("#EIMS_C_50007_wrap").length > 0) {
            EIMS_C_50007.Init();
        }
    } catch (err) { }
});

var EIMS_C_50007 = {
    Config: {
        Speed: 300,    //滑动速度
        IsAutoPlay: true,    //是否自动切换
        TimeInterval: 3000    //切换间隔
    },

    Init: function () {

        EIMS_C_50007.InitImages();

        var $main = $(".EIMS_C_50007_main");
        var $ul = $(".EIMS_C_50007_ul");
        var $li = $ul.children("li");
        var $lights = $(".EIMS_C_50007_lights");
        var $curr_class = "EIMS_C_50007_lightsCurr";
        var speed = EIMS_C_50007.Config.Speed;
        var isAutoPlay = EIMS_C_50007.Config.IsAutoPlay;
        var timeInterval = EIMS_C_50007.Config.TimeInterval;

        $li.css("width", parseInt($main.outerWidth(true)));
        $ul.css("width", $li.length * $li.outerWidth(true));

        $li.each(function () {
            $lights.append("<span></span>");
            $(this).attr("lights", $(this).index());
        });
        var idx;
        var size = $li.size();
        //点击焦点图切换：
        $lights.children().first().addClass($curr_class);
        $lights.children("span").click(function () {
            var index = $(this).index();
            idx = parseInt($ul.children().first().attr("lights"));
            var num = index - idx;
            num = num > 0 ? num : num + size;
            for (var i = 0; i < num; i++) {
                $ul.append($ul.children().first());
            }
            $ul.stop().animate({ "left": 0 }, speed);
            idx = $ul.children().first().attr("lights");
            $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
        });

        function nextImg() {
            $ul.stop().animate({ left: "-" + $li.outerWidth(true) + "px" }, speed, function () {
                $ul.append($ul.children().first());
                $ul.css("left", 0);
                idx = $ul.children().first().attr("lights");
                $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
                return idx;
            });
        }

        function prevImg() {
            $ul.css('left', -$li.outerWidth(true));
            $ul.prepend($ul.children().last());
            $ul.stop().animate({ "left": 0 }, speed);

            idx = $ul.children().first().attr("lights");
            $lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
        }

        if (isAutoPlay == true) {
            var auto = setInterval(nextImg, timeInterval);
            $ul.mouseover(function () {
                clearInterval(auto);
            });
            $ul.mouseleave(function () {
                auto = setInterval(nextImg, timeInterval);
            });
        }

        var mc = new Hammer($ul[0]);
        mc.on("swipeleft", function (ev) {
            nextImg();
        });
        mc.on("swiperight", function (ev) {
            prevImg();
        });

    },

    InitImages: function () {
        var imgs = relatedImages.split(',');
        var htmlStr = "";
        for (var i = 0; i < imgs.length; i++) {
            htmlStr += "<li><img data-original=\"" + imgs[i] + "\" /></li>";
        }
        $(".EIMS_C_50007_ul").html(htmlStr);
        ReLoadImage($("#EIMS_C_50007_wrap")[0]);
    }

};
/* EIMS_C_50007 End */
/*end_xn_mc_prodv_31_wrap*/

/*xn_mc_prodv_32_wrap*/
/* EIMS_C_50008 Start */
$(function () {
    try {
        if ($("#EIMS_C_50008_Panel").length > 0) {
            EIMS_C_50008.Init();
        }
    } catch (error) { }
});

var EIMS_C_50008 = {
    Config: {//配置信息，可自行修改
        CartUrl: "/m/spcstep1.aspx",     //购物车地址
        AddCartFailPrompt: "加入购物车失败", //加入购物车失败提示
        BuyType: 1,         //购买类型
        IsJump: "0"         //是否跳转
    },
    Init: function () {

        $(".EIMS_C_50008_selectors").css("marginLeft", $(".EIMS_C_50008_selectors").outerWidth());

        var pId = QueryString("Id"); //商品id

        if (IsNullOrEmpty(pId) || pId < 1) {
            document.location.href = MergeUrlParas("/Admin/Error.aspx", true, ["Tip", "ClassName"], ["请传入商品id", location.href]);
            return;
        }

        if (IsNullOrEmpty(EIMS_C_50008_ProInfo)) { return; }

        EIMS_C_50008.InitData();
    },
    /* 初始加载商品信息 */
    InitData: function () {

        var proInfo = EIMS_C_50008_ProInfo;

        //有销售属性，加载销售属性
        if (!IsNullOrEmpty(proInfo.SalesProperty)) {
            EIMS_C_50008.InitPropertys();
        }

        $("#EIMS_C_50008_Name").text(proInfo.Name);
        $(".EIMS_C_50008_BuyPrice").text(proInfo.BuyPrice.toFixed(2));
        $("#EIMS_C_50008_MarketPrice").text(proInfo.MarketPrice.toFixed(2));
        $("#EIMS_C_50008_Stock").text(proInfo.Quantity);
        $("#EIMS_C_50008_productAliaName").text(EIMS_C_50008_ProInfo.AliaName);
        $("#EIMS_C_50008_ProNum").val(1);

        $(".EIMS_C_50008_property").on("click", function () {
            $(".EIMS_C_50008_selectors").attr("bindtype", "");
            EIMS_C_50008.SlideSelectors();
        });    //属性选择
        $("#EIMS_C_50008_btnAddCart").on("click", function () {
            $(".EIMS_C_50008_selectors").attr("bindtype", "0");
            EIMS_C_50008.SlideSelectors();
        });    //加入购物车
        $("#EIMS_C_50008_btnBuyNow").on("click", function () {
            $(".EIMS_C_50008_selectors").attr("bindtype", "1");
            EIMS_C_50008.SlideSelectors();
        });    //立刻购买

        $(".EIMS_C_50008_AddCount,.EIMS_C_50008_MinusCount").on("click", function () {
            EIMS_C_50008.ChangeNum(this);
        });    //加减按钮事件
        $("#EIMS_C_50008_ProNum").on("change", function () {
            EIMS_C_50008.CheckBuyNum(this);
        });    //商品数量文本框输入数字事件
        $("#EIMS_C_50008_btnOk").on("click", function () {

            //设置属性标签
            var labels = "", title;
            $(".EIMS_C_50008_SelectedPro").each(function () {
                title = $(this).text().length > 0 ? $(this).text() : $(this).find("img").attr("title");
                labels += "/" + title;
            });
            labels = labels.substr(1);
            if (labels.length > 0) {
                $("#EIMS_C_50008_SelectedProperty").text(labels);
            }

            //滑动或加入购物车
            var type = $(".EIMS_C_50008_selectors").attr("bindtype");
            if (IsNullOrEmpty(type)) {
                EIMS_C_50008.SlideSelectors();
            } else {
                EIMS_C_50008.AddCart(parseInt(type));
            }
        });    //根据点击来源判断操作类型
        $(".EIMS_C_50008_arrowLeft").on("click", function () {
            EIMS_C_50008.SlideSelectors();
        });    //隐藏属性选择面板
    },

    /* 加载商品销售属性信息 */
    InitPropertys: function () {

        var proInfo = EIMS_C_50008_ProInfo;
        var titles = [], htmls = ["", ""], content = "", labels = "";
        var curSelected = proInfo.SalesProperty.Cur.split(','); //当前选中的属性id和父级id(有父级id的情况下)
        var propertyInfo = proInfo.SalesProperty.Pro; //属性信息
        titles[0] = propertyInfo[0].PropertyLabel;      //一级属性标签名

        for (var i = 0; i < propertyInfo.length; i++) {//[{...,sub: [{}, {}]}, {..., sub: [{{}, {}]}]

            if (propertyInfo[i].Id == curSelected[0]) { //当前选中一级属性
                htmls[0] += "<a href=\"javascript:\" class=\"EIMS_C_50008_SelectedPro EIMS_C_50008_FirstLevel\"";

                if (curSelected.length > 1 && propertyInfo[i].Sub != null) {    //表示有子级属性
                    var twoPros = propertyInfo[i].Sub;
                    titles[1] = twoPros[0].PropertyLabel; //子级属性标签名

                    for (var k = 0; k < twoPros.length; k++) {

                        if (twoPros[k].Id == curSelected[1]) {//当前选中子级属性

                            proInfo.Id = twoPros[k].ProductId;
                            proInfo.RelatedImages = twoPros[k].RelatedImages;
                            proInfo.AliaName = twoPros[k].AliaName;
                            proInfo.BuyPrice = twoPros[k].BuyPrice; //折后价(若是促销则是促销价)
                            proInfo.GroupPrice = twoPros[k].GroupPrice;
                            proInfo.Discount = twoPros[k].Discount;
                            proInfo.DiscountPrice = twoPros[k].DiscountPrice; //折后价，促销结束后，售价取DiscountPrice
                            proInfo.MarketPrice = IsNullOrEmpty(twoPros[k].MarketPrice) ? 0 : parseFloat(twoPros[k].MarketPrice);
                            proInfo.Price = IsNullOrEmpty(twoPros[k].Price) ? 0 : parseFloat(twoPros[k].Price);
                            proInfo.Quantity = twoPros[k].Quantity;
                            proInfo.IsLowerPrices = twoPros[k].IsLowerPrices;
                            proInfo.LowerPricesStartTime = twoPros[k].LowerPricesStartTime;
                            proInfo.LowerPricesEndTime = twoPros[k].LowerPricesEndTime;

                            htmls[1] += "<a href=\"javascript:\" class=\"EIMS_C_50008_SelectedPro\"";
                        } else {
                            htmls[1] += "<a href=\"javascript:\" class=\"EIMS_C_50008_DefaultPro\"";
                        }

                        if (IsNullOrEmpty(twoPros[k].PropertyImage)) {//一级属性
                            content = twoPros[k].Name;
                        }
                        else {
                            content = "<img src=\"" + twoPros[k].PropertyImage
                                + "\" title=\"" + twoPros[k].Name + "\"/>"
                        }

                        htmls[1] += " bindtype=\"1\" bindid=\"" + twoPros[k].Id + "\" bindkeyid=\""
                            + twoPros[k].PropertyId + "\">" + content + "</a>&nbsp;";
                    } //for循环 end

                } else {    //表示无子级属性
                    proInfo.Id = propertyInfo[i].ProductId;
                    proInfo.RelatedImages = propertyInfo[i].RelatedImages;
                    proInfo.AliaName = propertyInfo[i].AliaName;
                    proInfo.BuyPrice = propertyInfo[i].BuyPrice;
                    proInfo.GroupPrice = propertyInfo[i].GroupPrice;
                    proInfo.Discount = propertyInfo[i].Discount;
                    proInfo.DiscountPrice = propertyInfo[i].DiscountPrice;
                    proInfo.MarketPrice = IsNullOrEmpty(propertyInfo[i].MarketPrice) ? 0 : parseFloat(propertyInfo[i].MarketPrice);
                    proInfo.Price = IsNullOrEmpty(propertyInfo[i].Price) ? 0 : parseFloat(propertyInfo[i].Price);
                    proInfo.Quantity = propertyInfo[i].Quantity;
                    proInfo.IsLowerPrices = propertyInfo[i].IsLowerPrices;
                    proInfo.LowerPricesStartTime = propertyInfo[i].LowerPricesStartTime;
                    proInfo.LowerPricesEndTime = propertyInfo[i].LowerPricesEndTime;
                }

            } else {
                htmls[0] += "<a href=\"javascript:\" class=\"EIMS_C_50008_DefaultPro EIMS_C_50008_FirstLevel\"";
            }

            if (IsNullOrEmpty(propertyInfo[i].PropertyImage)) {//一级属性
                content = propertyInfo[i].Name;
            }
            else {
                content = "<img src=\"" + propertyInfo[i].PropertyImage
                    + "\" title=\"" + propertyInfo[i].Name + "\"/>"
            }

            htmls[0] += " bindtype=\"0\" bindid=\"" + propertyInfo[i].Id + "\">" + content + "</a>&nbsp;";
        }

        var html3 = "";
        for (var i = 0; i < titles.length; i++) {
            html3 += "<div class=\"EIMS_C_50008_PropertyRow\">" + titles[i] + "：" + htmls[i] + "</div>";
            labels += i == 0 ? titles[i] : "," + titles[i];
        }

        if (html3.length > 0) {
            $(".EIMS_C_50008_SaleProperty").html(html3).show();
        }
        $("#EIMS_C_50008_SelectedProperty").text(labels);

        $(".EIMS_C_50008_PropertyRow a").click(function () {
            EIMS_C_50008.ChangeProperty(this);
        });

        $("#EIMS_C_50008_productAliaName").text(proInfo.AliaName);
        $(".EIMS_C_50008_BuyPrice").text(proInfo.BuyPrice.toFixed(2));
        $("#EIMS_C_50008_MarketPrice").text(proInfo.MarketPrice.toFixed(2));
        $("#EIMS_C_50008_Stock").text(proInfo.Quantity);
    },

    ChangeProperty: function (obj) {
        var proInfo = EIMS_C_50008_ProInfo;
        var type = $(obj).attr("bindtype");
        var propertyId = $(obj).attr("bindid");
        var curSelected = proInfo.SalesProperty.Cur.split(',');

        if (curSelected.length == 1) {  //表示只有一级属性
            if (curSelected[0] == propertyId) {
                return;
            }
            proInfo.SalesProperty.Cur = propertyId;
        }
        else {  //表示有两级属性
            if (propertyId == curSelected[0] || propertyId == curSelected[1]) {
                return;
            }

            if (type == "0") {
                //属性key Id（表T_PropertyKeys的中id）
                var propertyKeyId = $(".EIMS_C_50008_SelectedPro")[1].getAttribute("bindkeyid");
                var propertyInfo = proInfo.SalesProperty.Pro;

                //根据key id查属性表id
                for (var i = 0; i < propertyInfo.length; i++) {
                    if (propertyInfo[i].Id == propertyId) {
                        var twoPros = propertyInfo[i].Sub;
                        var isGetKeyId = false; //是否获得属性keyId
                        for (var k = 0; k < twoPros.length; k++) {
                            if (twoPros[k].PropertyId == propertyKeyId) {
                                proInfo.SalesProperty.Cur = propertyId + "," + twoPros[k].Id;
                                isGetKeyId = true;
                                break;
                            }
                        }

                        if (!isGetKeyId) {//没有获取相应keyId，则取twoPros第一条
                            proInfo.SalesProperty.Cur = propertyId + "," + twoPros[0].Id;
                        }
                        break;
                    }
                }

            } else {
                proInfo.SalesProperty.Cur = curSelected[0] + "," + propertyId;
            }
        }
        //重新加载属性信息
        EIMS_C_50008.InitPropertys();

        if (type == "0") {//切换一级属性时，重新加载多图信息
            EIMS_C_50008.InitMulImgs();
        }

    }, //切换产品属性

    ChangeNum: function (obj) {
        var type = $(obj).attr("bindtype");
        var oldNum = parseInt($("#EIMS_C_50008_ProNum").val());
        if (isNaN(oldNum)) {
            oldNum = 1;
        }

        if (type == "1") {
            if (EIMS_C_50008_IsCheckQuantity == 1 && oldNum > EIMS_C_50008_ProInfo.Quantity - 1) {
                $("#EIMS_C_50008_ProNum").val(EIMS_C_50008_ProInfo.Quantity);
                return;
            }
            $("#EIMS_C_50008_ProNum").val(oldNum + 1);
        } else if (type == "0" && oldNum > 1) {
            $("#EIMS_C_50008_ProNum").val(oldNum - 1);
        }
    }, //改变购买数量

    CheckBuyNum: function (obj) {
        var num = parseInt($(obj).val());
        if (isNaN(num) || num < 1) {
            num = 1;
        }

        $(obj).val(num);
        var proRealNum = EIMS_C_50008_ProInfo.Quantity;

        if (EIMS_C_50008_IsCheckQuantity == 1) {
            if (num > proRealNum) {
                alert("库存不够");
                $(obj).val(1);
            }
        }
    }, //检验输入的购买数量

    InitMulImgs: function () {
        if (EIMS_C_50008_ProInfo.Id < 1) {
            return;
        }

        //此类标签在EIMS_C_50007控件上
        if ($(".EIMS_C_50007_ul").length < 1) { return; }

        relatedImages = EIMS_C_50008_ProInfo.RelatedImages;
        $(".EIMS_C_50007_lights").html("");
        EIMS_C_50007.Init();

        $(".EIMS_C_50007_ul img").each(function () {
            var imgsrc = $(this).attr("data-original");
            $(this).removeAttr("data-original").attr("src", imgsrc);
        });
    }, //加载多图

    SlideSelectors: function () {
        var $marginLefty = $(".EIMS_C_50008_selectors");
        $marginLefty.animate({ marginLeft: parseInt($marginLefty.css('marginLeft'), 10) == 0 ? $marginLefty.outerWidth() : 0 }, "fast", "linear");
    },

    CheckAddNum : function(number) {
        var curSelected = EIMS_C_50008_ProInfo.SalesProperty.Cur.split(',');
        var propertyInfo = EIMS_C_50008_ProInfo.SalesProperty.Pro;

        if (curSelected.length <= 1) {
            return true;
        }

        for (var i = 0; i < propertyInfo.length; i++) {
            if (propertyInfo[i].Id != curSelected[0]) {
                continue;
            }

            if (propertyInfo[i].Sub == null) {
                return true;
            }

            var twoPros = propertyInfo[i].Sub;
            for (var k = 0; k < twoPros.length; k++) {
                if (twoPros[k].Id != curSelected[1]) {
                    continue;
                }

                var name = "";
                if (/^\>\d+/.test(twoPros[k].Name)) {
                    name = twoPros[k].Name.split('>');
                    if (parseInt(name[1]) >= number) {
                        alert("请选择对应的【起批类型】，填写正确则走正常购买流程！");
                        return false;
                    }
                } else if (/^\d+\-\d+/.test(twoPros[k].Name)) {
                    name = twoPros[k].Name.split('-');
                    var n1 = parseInt(name[0]), n2 = parseInt(name[1]);
                    if (n1 > number || number > n2) {
                        alert("请选择对应的【起批类型】，填写正确则走正常购买流程！");
                        return false;
                    }
                }

                break;
            }

            break;
        }

        return true;
    },

    AddCart: function (type) {

        //查询选中属性对应的商品Id
        var proInfo = EIMS_C_50008_ProInfo;
        var productId = EIMS_C_50008_ProInfo.Id;
        var productNum = parseInt($("#EIMS_C_50008_ProNum").val()); //购买数量
        productNum = isNaN(productNum) ? 1 : productNum;

        if (!EIMS_C_50008.CheckAddNum(productNum)) {
            return;
        }

        EIMS_C_50008.Config.IsJump = type;
        var params = "", description = "", customizedDesc = "";
        var departmentTypeId = 0;

        if (productId <= 0) {
            alert("无效的商品Id");
            return false;
        }

        if (!IsNullOrEmpty(QueryString("BuyType"))) {
            EIMS_C_50008.Config.BuyType = parseInt(QueryString("BuyType"));
        }

        var keyValues = { "productId": productId, "quantity": productNum, "params": params, "description": description,
            "buyType": EIMS_C_50008.Config.BuyType, "customizedDesc": customizedDesc, "departmentTypeId": departmentTypeId
        };

        AjaxMethod("ShoppingCart", "AddProduct", keyValues, function (data) {
            EIMS_C_50008.AddCartCallBack(data);
        });
    }, //加入购物车

    AddCartCallBack: function (data) {

        if (data.result == 0) {
            alert(EIMS_C_50008.Config.AddCartFailPrompt + ", 原因：" + data.msg);
            return;
        }

        if (EIMS_C_50008.Config.IsJump == "1") {  //立即购买成功立刻跳转
            var jumpPage = MergeUrlParas(EIMS_C_50008.Config.CartUrl, false, [], []);
            document.location.href = jumpPage;
            return;
        } else if (EIMS_C_50008.Config.IsJump == "0") {
            alert("添加成功");
            EIMS_C_50008.SlideSelectors();
        }

    }, //加入购物车后回调函数

    GoCart: function () {
        var jumpPage = MergeUrlParas(EIMS_C_50008.Config.CartUrl, false, [], []);
        document.location.href = jumpPage;
    } //去购物车

}
/*  EIMS_C_50008  end  */
/*end_xn_mc_prodv_32_wrap*/

/*xn_mc_prodv_33_wrap*/
/* EIMS_C_50009 V1.2 2015/01/07 18:18 start */
$(function () {
    try {
        if ($("#EIMS_C_50009_Panel").length > 0) {
            EIMS_C_50009.Init();
        }
    } catch (error) { }
});

var EIMS_C_50009 = {
    Config: {//配置信息，可自行修改
        CartUrl: "/m/spcstep1.aspx",     //购物车地址
        AddCartFailPrompt: "加入购物车失败", //加入购物车失败提示
        BuyType: 1,         //购买类型
        IsJump: "0"         //是否跳转
    },
    Init: function () {

        var pId = QueryString("Id"); //商品id

        if (IsNullOrEmpty(pId) || pId < 1) {
            document.location.href = MergeUrlParas("/Admin/Error.aspx", true, ["Tip", "ClassName"], ["请传入商品id", location.href]);
            return;
        }

        if (IsNullOrEmpty(EIMS_C_50009_ProInfo)) { return; }

        EIMS_C_50009.InitData();
    },
    /* 初始加载商品信息 */
    InitData: function () {

        var proInfo = EIMS_C_50009_ProInfo;

        //有销售属性，加载销售属性
        if (!IsNullOrEmpty(proInfo.SalesProperty)) {
            EIMS_C_50009.InitPropertys();
        }

        $("#EIMS_C_50009_Name").text(proInfo.Name);
        $(".EIMS_C_50009_BuyPrice").text(proInfo.BuyPrice.toFixed(2));
        $("#EIMS_C_50009_MarketPrice").text(proInfo.MarketPrice.toFixed(2));
        $("#EIMS_C_50009_Stock").text(proInfo.Quantity);
        $("#EIMS_C_50009_productAliaName").text(EIMS_C_50009_ProInfo.AliaName);
        $("#EIMS_C_50009_ProNum").val(1);

        var h = $(document).height() - $(".EIMS_C_50009_selectors_bottom").height();
        $(".EIMS_C_50009_arrowDown").height(h);
        $(".EIMS_C_50009_selectors").hide();

        $("#EIMS_C_50009_btnBuyNow").on("click", function () {
            $(".EIMS_C_50009_selectors").attr("bindtype", "1");
            $(".EIMS_C_50009_selectors").slideDown();
        });    //立刻购买事件

        $("#EIMS_C_50009_btnAddCart").on("click", function () {
            $(".EIMS_C_50009_selectors").attr("bindtype", "0");
            $(".EIMS_C_50009_selectors").slideDown();
        });    //加入购物车事件

        $(".EIMS_C_50009_AddCount,.EIMS_C_50009_MinusCount").on("click", function () {
            EIMS_C_50009.ChangeNum(this);
        });    //加减按钮事件

        $("#EIMS_C_50009_ProNum").on("change", function () {
            EIMS_C_50009.CheckBuyNum(this);
        });    //商品数量文本框输入数字事件

        $("#EIMS_C_50009_btnOk").on("click", function () {
            var type = $(".EIMS_C_50009_selectors").attr("bindtype");
            EIMS_C_50009.AddCart(parseInt(type));
        });

        $(".EIMS_C_50009_arrowDown").on("click", function () {
            $(".EIMS_C_50009_selectors").slideUp();
        });
    },

    /* 加载商品销售属性信息 */
    InitPropertys: function () {

        var proInfo = EIMS_C_50009_ProInfo;
        var titles = [], htmls = ["", ""], content = "";
        var curSelected = proInfo.SalesProperty.Cur.split(','); //当前选中的属性id和父级id(有父级id的情况下)
        var propertyInfo = proInfo.SalesProperty.Pro; //属性信息
        titles[0] = propertyInfo[0].PropertyLabel;      //一级属性标签名

        for (var i = 0; i < propertyInfo.length; i++) {//[{...,sub: [{}, {}]}, {..., sub: [{{}, {}]}]

            if (propertyInfo[i].Id == curSelected[0]) { //当前选中一级属性
                htmls[0] += "<a href=\"javascript:\" class=\"EIMS_C_50009_SelectedPro EIMS_C_50009_FirstLevel\"";

                if (curSelected.length > 1 && propertyInfo[i].Sub != null) {    //表示有子级属性
                    var twoPros = propertyInfo[i].Sub;
                    titles[1] = twoPros[0].PropertyLabel; //子级属性标签名

                    for (var k = 0; k < twoPros.length; k++) {

                        if (twoPros[k].Id == curSelected[1]) {//当前选中子级属性

                            proInfo.Id = twoPros[k].ProductId;
                            proInfo.RelatedImages = twoPros[k].RelatedImages;
                            proInfo.AliaName = twoPros[k].AliaName;
                            proInfo.BuyPrice = twoPros[k].BuyPrice; //折后价(若是促销则是促销价)
                            proInfo.GroupPrice = twoPros[k].GroupPrice;
                            proInfo.Discount = twoPros[k].Discount;
                            proInfo.DiscountPrice = twoPros[k].DiscountPrice; //折后价，促销结束后，售价取DiscountPrice
                            proInfo.MarketPrice = IsNullOrEmpty(twoPros[k].MarketPrice) ? 0 : parseFloat(twoPros[k].MarketPrice);
                            proInfo.Price = IsNullOrEmpty(twoPros[k].Price) ? 0 : parseFloat(twoPros[k].Price);
                            proInfo.Quantity = twoPros[k].Quantity;
                            proInfo.IsLowerPrices = twoPros[k].IsLowerPrices;
                            proInfo.LowerPricesStartTime = twoPros[k].LowerPricesStartTime;
                            proInfo.LowerPricesEndTime = twoPros[k].LowerPricesEndTime;

                            htmls[1] += "<a href=\"javascript:\" class=\"EIMS_C_50009_SelectedPro\"";
                        } else {
                            htmls[1] += "<a href=\"javascript:\" class=\"EIMS_C_50009_DefaultPro\"";
                        }

                        if (IsNullOrEmpty(twoPros[k].PropertyImage)) {//一级属性
                            content = twoPros[k].Name;
                        }
                        else {
                            content = "<img src=\"" + twoPros[k].PropertyImage
                                + "\" title=\"" + twoPros[k].Name + "\"/>"
                        }

                        htmls[1] += " bindtype=\"1\" bindid=\"" + twoPros[k].Id + "\" bindkeyid=\""
                            + twoPros[k].PropertyId + "\">" + content + "</a>&nbsp;";
                    } //for循环 end

                } else {    //表示无子级属性
                    proInfo.Id = propertyInfo[i].ProductId;
                    proInfo.RelatedImages = propertyInfo[i].RelatedImages;
                    proInfo.AliaName = propertyInfo[i].AliaName;
                    proInfo.BuyPrice = propertyInfo[i].BuyPrice;
                    proInfo.GroupPrice = propertyInfo[i].GroupPrice;
                    proInfo.Discount = propertyInfo[i].Discount;
                    proInfo.DiscountPrice = propertyInfo[i].DiscountPrice;
                    proInfo.MarketPrice = IsNullOrEmpty(propertyInfo[i].MarketPrice) ? 0 : parseFloat(propertyInfo[i].MarketPrice);
                    proInfo.Price = IsNullOrEmpty(propertyInfo[i].Price) ? 0 : parseFloat(propertyInfo[i].Price);
                    proInfo.Quantity = propertyInfo[i].Quantity;
                    proInfo.IsLowerPrices = propertyInfo[i].IsLowerPrices;
                    proInfo.LowerPricesStartTime = propertyInfo[i].LowerPricesStartTime;
                    proInfo.LowerPricesEndTime = propertyInfo[i].LowerPricesEndTime;
                }
            } else {
                htmls[0] += "<a href=\"javascript:\" class=\"EIMS_C_50009_DefaultPro EIMS_C_50009_FirstLevel\"";
            }

            if (IsNullOrEmpty(propertyInfo[i].PropertyImage)) {//一级属性
                content = propertyInfo[i].Name;
            }
            else {
                content = "<img src=\"" + propertyInfo[i].PropertyImage
                    + "\" title=\"" + propertyInfo[i].Name + "\"/>"
            }

            htmls[0] += " bindtype=\"0\" bindid=\"" + propertyInfo[i].Id + "\">" + content + "</a>&nbsp;";
        }

        var html3 = "";
        for (var i = 0; i < titles.length; i++) {
            html3 += "<div class=\"EIMS_C_50009_PropertyRow\">" + titles[i] + "：" + htmls[i] + "</div>";
        }

        if (html3.length > 0) {
            $(".EIMS_C_50009_SaleProperty").html(html3).show();
        }

        $(".EIMS_C_50009_PropertyRow a").on("click", function () {
            EIMS_C_50009.ChangeProperty(this);
        });

        $("#EIMS_C_50009_productAliaName").text(proInfo.AliaName);
        $(".EIMS_C_50009_BuyPrice").text(proInfo.BuyPrice.toFixed(2));
        $("#EIMS_C_50009_MarketPrice").text(proInfo.MarketPrice.toFixed(2));
        $("#EIMS_C_50009_Stock").text(proInfo.Quantity);
    },

    ChangeProperty: function (obj) {
        var proInfo = EIMS_C_50009_ProInfo;
        var type = $(obj).attr("bindtype");
        var propertyId = $(obj).attr("bindid");
        var curSelected = proInfo.SalesProperty.Cur.split(',');

        if (curSelected.length == 1) {  //表示只有一级属性
            if (curSelected[0] == propertyId) {
                return;
            }
            proInfo.SalesProperty.Cur = propertyId;
        }
        else {  //表示有两级属性
            if (propertyId == curSelected[0] || propertyId == curSelected[1]) {
                return;
            }

            if (type == "0") {
                //属性key Id（表T_PropertyKeys的中id）
                var propertyKeyId = $(".EIMS_C_50009_SelectedPro")[1].getAttribute("bindkeyid");
                var propertyInfo = proInfo.SalesProperty.Pro;

                //根据key id查属性表id
                for (var i = 0; i < propertyInfo.length; i++) {
                    if (propertyInfo[i].Id == propertyId) {
                        var twoPros = propertyInfo[i].Sub;
                        var isGetKeyId = false; //是否获得属性keyId
                        for (var k = 0; k < twoPros.length; k++) {
                            if (twoPros[k].PropertyId == propertyKeyId) {
                                proInfo.SalesProperty.Cur = propertyId + "," + twoPros[k].Id;
                                isGetKeyId = true;
                                break;
                            }
                        }

                        if (!isGetKeyId) {//没有获取相应keyId，则取twoPros第一条
                            proInfo.SalesProperty.Cur = propertyId + "," + twoPros[0].Id;
                        }
                        break;
                    }
                }

            } else {
                proInfo.SalesProperty.Cur = curSelected[0] + "," + propertyId;
            }
        }
        //重新加载属性信息
        EIMS_C_50009.InitPropertys();

        if (type == "0") {//切换一级属性时，重新加载多图信息
            EIMS_C_50009.InitMulImgs();
        }

    }, //切换产品属性

    ChangeNum: function (obj) {
        var type = $(obj).attr("bindtype");
        var oldNum = parseInt($("#EIMS_C_50009_ProNum").val());
        if (isNaN(oldNum)) {
            oldNum = 1;
        }

        if (type == "1") {
            if (EIMS_C_50009_IsCheckQuantity == 1 && oldNum > EIMS_C_50009_ProInfo.Quantity - 1) {
                $("#EIMS_C_50009_ProNum").val(EIMS_C_50009_ProInfo.Quantity);
                return;
            }
            $("#EIMS_C_50009_ProNum").val(oldNum + 1);
        } else if (type == "0" && oldNum > 1) {
            $("#EIMS_C_50009_ProNum").val(oldNum - 1);
        }
    }, //改变购买数量

    CheckBuyNum: function (obj) {
        var num = parseInt($(obj).val());
        if (isNaN(num) || num < 1) {
            num = 1;
        }

        $(obj).val(num);
        var proRealNum = EIMS_C_50009_ProInfo.Quantity;

        if (EIMS_C_50009_IsCheckQuantity == 1) {
            if (num > proRealNum) {
                alert("库存不够");
                $(obj).val(1);
            }
        }
    }, //检验输入的购买数量

    InitMulImgs: function () {
        if (EIMS_C_50009_ProInfo.Id < 1) {
            return;
        }

        //此类标签在EIMS_C_50007控件上
        if ($(".EIMS_C_50007_ul").length < 1) { return; }

        var imgs = EIMS_C_50009_ProInfo.RelatedImages.split(',');
        var htmlStr = "<ul class=EIMS_C_50007_ul>";

        for (var i = 0; i < imgs.length; i++) {
            htmlStr += "<li><a href=\"javascript:\" ><img src=\"" + imgs[i] + "\" /></a></li>";
        }
        htmlStr += "</ul>";
        $(".EIMS_C_50007_ul").html(htmlStr);

        EIMS_C_50007.Init();

    }, //加载多图

    AddCart: function (type) {

        //查询选中属性对应的商品Id
        var proInfo = EIMS_C_50009_ProInfo;
        var productId = EIMS_C_50009_ProInfo.Id;
        var productNum = parseInt($("#EIMS_C_50009_ProNum").val()); //购买数量
        productNum = isNaN(productNum) ? 1 : productNum;
        EIMS_C_50009.Config.IsJump = type;
        var params = "", description = "", customizedDesc = "";
        var departmentTypeId = 0;

        if (productId <= 0) {
            alert("无效的商品Id");
            return false;
        }

        if (!IsNullOrEmpty(QueryString("BuyType"))) {
            EIMS_C_50009.Config.BuyType = parseInt(QueryString("BuyType"));
        }

        var keyValues = { "productId": productId, "quantity": productNum, "params": params, "description": description,
            "buyType": EIMS_C_50009.Config.BuyType, "customizedDesc": customizedDesc, "departmentTypeId": departmentTypeId
        };

        AjaxMethod("ShoppingCart", "AddProduct", keyValues, function (data) {
            EIMS_C_50009.AddCartCallBack(data);
        });
    }, //加入购物车

    AddCartCallBack: function (data) {

        if (data.result == 0) {
            alert(EIMS_C_50009.Config.AddCartFailPrompt + ", 原因：" + data.msg);
            return;
        }

        if (EIMS_C_50009.Config.IsJump == "1") {  //立即购买成功立刻跳转
            var jumpPage = MergeUrlParas(EIMS_C_50009.Config.CartUrl, false, [], []);
            document.location.href = jumpPage;
            return;
        } else if (EIMS_C_50009.Config.IsJump == "0") {
            alert("添加成功");
            $(".EIMS_C_50009_selectors").slideUp();
        }

    }, //加入购物车后回调函数

    GoCart: function () {
        var jumpPage = MergeUrlParas(EIMS_C_50009.Config.CartUrl, false, [], []);
        document.location.href = jumpPage;
    } //去购物车
}
/*  EIMS_C_50009  end  */
/*end_xn_mc_prodv_33_wrap*/

/*xn_mc_prodv_34_wrap*/
/* EIMS_C_50020 Start */
$(function () {
    try {
        if ($("#EIMS_C_50020_Wrap").length > 0) {
            EIMS_C_50020.Init();
        }
    } catch (err) { alert(err); }
});

var EIMS_C_50020 = {
    Config: {
        SelectPropertyBeforeAddToCart: true,    //false直接加入购物车，true弹出属性选择框
        ProInfo: null
    },
    Init: function () {
        $(".EIMS_C_50020_Cart").on("click", function (e) {
            var wrapper = $(this).parent();
            if (EIMS_C_50020.Config.SelectPropertyBeforeAddToCart) {
                var proInfo = $(this).siblings(".EIMS_C_50020_ProInfo").text();
                EIMS_C_50020.Config.ProInfo = eval('(' + proInfo + ')')
                EIMS_C_50020.InitProperty(wrapper);
                EIMS_C_50020.BindEvents(wrapper);
                $(this).next().fadeIn();
            } else {
                var productId = wrapper.attr("bindid");
                if (!IsNullOrEmpty(QueryString("id"))) {
                    productId = QueryString("id");
                }
                EIMS_C_50020.AddToCart(e, productId, 1);
            }
        });
    },
    BindEvents: function (wrapper) {
        wrapper.find("dd").off("click").on("click", function () {
            EIMS_C_50020.ChangeProperty(this, wrapper);
        });

        wrapper.find(".EIMS_C_50020_AddCount,.EIMS_C_50020_MinusCount").off("click").on("click", function () {
            EIMS_C_50020.ChangeNum(this);
        });    //加减按钮事件

        wrapper.find(".EIMS_C_50020_ProNum").off("change").on("change", function () {
            EIMS_C_50020.CheckBuyNum(this);
        });    //商品数量文本框输入数字事件

        wrapper.find(".EIMS_C_50020_BtnAddToCart").off("click").on("click", function (e) {
            var productId = EIMS_C_50020.Config.ProInfo.Id;
            if (!IsNullOrEmpty(QueryString("id"))) {
                productId = QueryString("id");
            }
            var quantity = wrapper.find(".EIMS_C_50020_ProNum").val();
            EIMS_C_50020.AddToCart(e, productId, quantity);
        });

        wrapper.find(".EIMS_C_50020_BtnCancel").off("click").on("click", function () {
            wrapper.find(".EIMS_C_50020_selector").fadeOut();
        });
    },
    AddToCart: function (e, productId, quantity) {
        if (productId <= 0) {
            alert("无效的商品");
            return false;
        }
        $(e.target).prop("disabled", true);
        var keyValues = { "productId": productId, "quantity": quantity };
        AjaxMethod("ShoppingCart", "AddProduct", keyValues, function (data) {
            if (data.result == 0) {
                alert("加入购物车失败, 原因：" + data.msg);
                return;
            }
            EIMS_C_50020.AnimatePlusOne(e);
            $(e.target).parents(".EIMS_C_50020_Wrap").find(".EIMS_C_50020_selector").fadeOut();
            $(e.target).prop("disabled", false);
            if ($("#EIMS_C_50005_Wrap").length > 0) {
                EIMS_C_50005.Init();
            }
        });
    },

    InitProperty: function (wrapper) {
        var proInfo = EIMS_C_50020.Config.ProInfo;
        var titles = [], htmls = ["", ""], content = "";
        var curSelected = proInfo.SalesProperty.Cur.split(','); //当前选中的属性id和父级id(有父级id的情况下)
        var propertyInfo = proInfo.SalesProperty.Pro; //属性信息
        titles[0] = propertyInfo[0].PropertyLabel;      //一级属性标签名

        for (var i = 0; i < propertyInfo.length; i++) {//[{...,sub: [{}, {}]}, {..., sub: [{{}, {}]}]

            if (propertyInfo[i].Id == curSelected[0]) { //当前选中一级属性
                htmls[0] += "<dd class=\"EIMS_C_50020_SelectedPro EIMS_C_50020_FirstLevel\"";

                if (curSelected.length > 1 && propertyInfo[i].Sub != null) {    //表示有子级属性
                    var twoPros = propertyInfo[i].Sub;
                    titles[1] = twoPros[0].PropertyLabel; //子级属性标签名

                    for (var k = 0; k < twoPros.length; k++) {

                        if (twoPros[k].Id == curSelected[1]) {//当前选中子级属性
                            proInfo.Id = twoPros[k].ProductId;
                            htmls[1] += "<dd class=\"EIMS_C_50020_SelectedPro\"";
                        } else {
                            htmls[1] += "<dd class=\"EIMS_C_50020_DefaultPro\"";
                        }

                        if (IsNullOrEmpty(twoPros[k].PropertyImage)) {//一级属性
                            content = twoPros[k].Name;
                        }
                        else {
                            content = "<img src=\"" + twoPros[k].PropertyImage
                                + "\" title=\"" + twoPros[k].Name + "\"/>"
                        }

                        htmls[1] += " bindtype=\"1\" bindid=\"" + twoPros[k].Id + "\" bindkeyid=\""
                            + twoPros[k].PropertyId + "\">" + content + "</a>&nbsp;";
                    } //for循环 end

                } else {    //表示无子级属性
                    proInfo.Id = propertyInfo[i].ProductId;
                }
            } else {
                htmls[0] += "<dd class=\"EIMS_C_50020_DefaultPro EIMS_C_50020_FirstLevel\"";
            }

            if (IsNullOrEmpty(propertyInfo[i].PropertyImage)) {//一级属性
                content = propertyInfo[i].Name;
            }
            else {
                content = "<img src=\"" + propertyInfo[i].PropertyImage
                    + "\" title=\"" + propertyInfo[i].Name + "\"/>"
            }

            htmls[0] += " bindtype=\"0\" bindid=\"" + propertyInfo[i].Id + "\">" + content + "</a>&nbsp;";
        }

        var html3 = "";
        for (var i = 0; i < titles.length; i++) {
            html3 += "<dt class=\"EIMS_C_50020_PropertyRow\">" + titles[i] + "：" + htmls[i] + "</dt>";
        }

        if (html3.length > 0) {
            wrapper.find(".EIMS_C_50020_SaleProperty").html(html3);
        }

        wrapper.find(".EIMS_C_50020_Stock").text(proInfo.Quantity);
        EIMS_C_50020.BindEvents(wrapper);
    },
    ChangeProperty: function (obj, wrapper) {
        var proInfo = EIMS_C_50020.Config.ProInfo;
        var type = $(obj).attr("bindtype");
        var propertyId = $(obj).attr("bindid");
        var curSelected = proInfo.SalesProperty.Cur.split(',');

        if (curSelected.length == 1) {  //表示只有一级属性
            if (curSelected[0] == propertyId) {
                return;
            }
            proInfo.SalesProperty.Cur = propertyId;
        }
        else {  //表示有两级属性
            if (propertyId == curSelected[0] || propertyId == curSelected[1]) {
                return;
            }

            if (type == "0") {
                //属性key Id（表T_PropertyKeys的中id）
                var propertyKeyId = wrapper.find(".EIMS_C_50020_SelectedPro")[1].getAttribute("bindkeyid");
                var propertyInfo = proInfo.SalesProperty.Pro;

                //根据key id查属性表id
                for (var i = 0; i < propertyInfo.length; i++) {
                    if (propertyInfo[i].Id == propertyId) {
                        var twoPros = propertyInfo[i].Sub;
                        var isGetKeyId = false; //是否获得属性keyId
                        for (var k = 0; k < twoPros.length; k++) {
                            if (twoPros[k].PropertyId == propertyKeyId) {
                                proInfo.SalesProperty.Cur = propertyId + "," + twoPros[k].Id;
                                isGetKeyId = true;
                                break;
                            }
                        }

                        if (!isGetKeyId) {//没有获取相应keyId，则取twoPros第一条
                            proInfo.SalesProperty.Cur = propertyId + "," + twoPros[0].Id;
                        }
                        break;
                    }
                }

            } else {
                proInfo.SalesProperty.Cur = curSelected[0] + "," + propertyId;
            }
        }
        //重新加载属性信息
        EIMS_C_50020.InitProperty(wrapper);
    }, //切换产品属性
    ChangeNum: function (obj) {
        var type = $(obj).attr("bindtype");
        var proNum = $(obj).siblings(".EIMS_C_50020_ProNum");
        var oldNum = parseInt(proNum.val());
        if (isNaN(oldNum)) {
            oldNum = 1;
        }

        if (type == "1") {
            var q = EIMS_C_50020.Config.ProInfo.Quantity;
            if ($(this).parents(".EIMS_C_50020_Wrap").find(".EIMS_C_50020_CheckCount").text() == "1" && oldNum > q - 1) {
                proNum.val(q);
                return;
            }
            proNum.val(oldNum + 1);
        } else if (type == "0" && oldNum > 1) {
            proNum.val(oldNum - 1);
        }
    }, //改变购买数量

    CheckBuyNum: function (obj) {
        var num = parseInt($(obj).val());
        if (isNaN(num) || num < 1) {
            num = 1;
        }

        $(obj).val(num);
        var proRealNum = EIMS_C_50020.Config.ProInfo.Quantity;

        if ($(this).parents(".EIMS_C_50020_Wrap").find(".EIMS_C_50020_CheckCount").text() == "1") {
            if (num > proRealNum) {
                alert("库存不够");
                $(obj).val(1);
            }
        }
    }, //检验输入的购买数量
    AnimatePlusOne: function (e) {
        var $i = $("<b>").text("+1");
        var x = e.pageX, y = e.pageY;
        $i.css({ top: y - 20, left: x, position: "absolute", color: "#E94F06" });
        $("body").append($i);
        $i.animate({ top: y - 180, opacity: 0, "font-size": "1.4em" }, 1500, function () {
            $i.remove();
        });
        e.stopPropagation();
    }
}
//EIMS_C_50020 End
/*end_xn_mc_prodv_34_wrap*/

/*xn_mc_feedback_2_wrap*/
/*-------2015-07-01修改取消留言-------*/
$(function(){
    try {
        if ($("#EIMS_C_10002_6_Main").length > 0) {
            EIMS_C_10002_6.Init();
        }
    } catch (err) { }
});

var EIMS_C_10002_6 = {


    Init: function () {
        $("#EIMS_C_10002_6_Params").val(para);
    },

    createMsgDiv: function () { //弹出一个div层
        var temp = $(".EIMS_C_10002_6_ui-btn")[0];
        if ($("#EIMS_C_10002_6_Type_ddl").length > 0) {
            var listDiv = document.createElement("DIV");
            listDiv.id = "EIMS_C_10002_6_MsgTypeList_div";
            listDiv.style.position = "absolute";
            listDiv.style.width = document.body.scrollWidth;
            listDiv.style.height = document.documentElement.offsetHeight;
            listDiv.style.zIndex = '1';
            listDiv.style.top = ($(".EIMS_C_10002_6_ui-btn").height() + $(".EIMS_C_10002_6_ui-btn").offset().top + 1) + "px";
            //listDiv.style.left=temp.style.offsetLeft+"px";
            listDiv.style.width = temp.offsetWidth + "px";

            listDiv.style.backgroundColor = "#D7D7D7";

            //listDiv.style.opacity='0.5';
            //listDiv.style.filter="alpha(opacity=80)";
            listDiv.style.opacity = '0.9';


            var msgListDdl = $("#EIMS_C_10002_6_Type_ddl")[0];
            var innerHtml = "<ul style='list-style:none;cursor:pointer;'>";
            for (var i = 0; i < msgListDdl.children.length; i++) {
                innerHtml += "<li onmousemove='this.style.backgroundColor=\"#4b6c9e\";' onmouseout='this.style.backgroundColor=\"\";' onclick='EIMS_C_10002_6.selectMsgType(this)' value='" + msgListDdl.children[i].value + "'>" + msgListDdl.children[i].innerHTML + "</li>";
            }
            innerHtml += "</ul>";

            listDiv.innerHTML = innerHtml;
            document.body.appendChild(listDiv);
        }
    },
    selectMsgType: function (obj) { //选择留言类型
        $("#EIMS_C_10002_6_Type_ddl").val(obj.value);
        if (obj.value > 0) {
            $(".EIMS_C_10002_6_ui-btn-text").html(obj.innerHTML);
        } else {
            $(".EIMS_C_10002_6_ui-btn-text").html("请选择留言类型");
        }

        alert($('#EIMS_C_10002_6_MsgTypeList_div'));

        //关闭弹出的div层
        $('#EIMS_C_10002_6_MsgTypeList_div').remove();
    },

    CheckMsgInfo: function () { //验证留言提交字段
        if ($("#EIMS_C_10002_6_Type_ddl").length > 0) {
            var msgType = $("#EIMS_C_10002_6_Type_ddl"); //留言类型
            if (msgType.val() <= 0) {
                alert('请选择留言类型！');
                return false;
            }
        }

        if ($("#EIMS_C_10002_6_AuthorName_Div").length > 0) {
            var msgAuthorName = $("#EIMS_C_10002_6_AuthorName"); //联系人
            if (msgAuthorName.val() == "联系人" || msgAuthorName.val() == "") {
                alert("请输入联系人姓名！");
                msgAuthorName.focus();
                return false;
            }
        }
        /*
         if ($("#EIMS_C_10002_6_CompanyName").length > 0) {
         var msgCompany = $("#EIMS_C_10002_6_CompanyName"); //公司名称
         if (msgCompany.val() == "公司名称" || msgCompany.val() == "") {
         alert("请输入公司名称！");
         return false;
         }
         }*/

        if ($("#EIMS_C_10002_6_Telephone_Div").length > 0) {
            var isMobile = /^1[3-8]{1}\d{9}$/;
            var isNumber = /^[0-9]*$/;  //11位数
            var isNum = /^[0-9]*[1-9][0-9]*$/; //自然数
            var isLetter=/[^0-9.]/g;

            var msgMobile = $("#EIMS_C_10002_6_Telephone"); //用户手机号
            if (msgMobile.val() == "联系人手机" || msgMobile.val() == "") {
                alert("请输入联系人手机！");
                return false;
            }

            if (isLetter.test(msgMobile.val())) {
                alert("请输入正确的手机号码！");
                return false;
            }

            if (isNum.test(msgMobile.val())) {
                if (!isNumber.test(msgMobile.val())) {
                    alert("手机号码应为11位数字，以13/14/15/17/18开头！");
                    return false;
                }

                if (!isMobile.test(msgMobile.val())) {
                    alert("手机号码格式不正确，请重新输入！");
                    return false;
                }
            }
        }

        /* if ($("#EIMS_C_10002_6_Email_Div").length > 0) {
         var isEmail = /^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/;

         var msgEmail = $("#EIMS_C_10002_6_Email");
         if (msgEmail.val() == "Email" || msgEmail.val() == "") {
         alert("请输入联系人邮箱！");
         return false;
         }

         if (!isEmail.test(msgEmail.val())) {
         alert("邮箱格式不正确，请重新输入！");
         return false;
         }
         }*/

        if ($("#EIMS_C_10002_6_MsgContent").length > 0) {
            var msgContent = $("#EIMS_C_10002_6_MsgContent"); //留言内容
            if (msgContent.val() == "请输入留言内容..." || msgContent.val() == "") {
                alert('请输入留言内容！');
                return false;
            }
        }

        return true;
    },



    SubmitAdvisorys: function () {
        //提交验证
        if (!EIMS_C_10002_6.CheckMsgInfo()) {
            return false;
        }

        var Params = null;
        if (para == null) {
            alert("无效的参数！");
            return false;
        }

        if (para.indexOf(",") < 0) {
            return false;
        }

        var paras = para.split(',');
        var typeid = paras[0];
        var device = paras[1];
        var content = "";

        var magContent = $("#EIMS_C_10002_6_MsgContent").val();
        var company = $("#EIMS_C_10002_6_CompanyName").val();
        var authorName = $("#EIMS_C_10002_6_AuthorName").val();
        var email = $("#EIMS_C_10002_6_Email").val();
        var mobile = $("#EIMS_C_10002_6_Telephone").val();
        var address = $("#EIMS_C_10002_6_AddressText").val();

        var content = "<Submit>\
                            <Content>" + magContent + "</Content>\
                            <Company>" + company + "</Company>\
                            <AuthorName>" + authorName + "</AuthorName>\
                            <Email>" + email + "</Email>\
                            <Mobile>" + mobile + "</Mobile>\
                            <Address>" + address + "</Address>\
                      </Submit>";

        Params = { "TypeId": typeid, "Device": device, "content": content };

        AjaxMethod("Common", "SubmitAdvisorys", Params, function (data) {
            if (IsNullOrEmpty(data)) {
                return;
            }

            if (data.result != 1) {
                return;
            }

            alert("提交留言成功！");
            document.location.reload();
        });

    },

    CancelMsg: function () {    //取消留言
        $("#EIMS_C_10002_6_MsgContent").val("");
        $("#EIMS_C_10002_6_CompanyName").val("");
        $("#EIMS_C_10002_6_AuthorName").val("");
        $("#EIMS_C_10002_6_Telephone").val("");
        $("#EIMS_C_10002_6_Email").val("");
        $("#EIMS_C_10002_6_postText").val("");
        $("#EIMS_C_10002_6_AddressText").val("");
    }
}
/*end_xn_mc_feedback_2_wrap*/

/*xn_mc_login_2_wrap*/
/* EIMS_C_50001 Start */
$(function () {
    try {
        if ($("#EIMS_C_50001_Panel").length > 0) {
            EIMS_C_50001.Init();
        }
    } catch (err) { }
});

var EIMS_C_50001 = {
    Config: {
        FindPwdPage: "/m/getchapass.aspx",    //找回密码页面
        RegisterPage: "/m/reg.aspx"    //注册页面
    },

    Init: function () {
        $('form').on("keypress", function (e) {
            var code = e.keyCode || e.which;
            if (code == 13 && !EIMS_C_50001.LoginCheck()) {
                e.preventDefault();
                return false;
            }
        });

        $("#EIMS_C_50001_btnLoging").click(function () {
            return EIMS_C_50001.LoginCheck();
        });

        $("#EIMS_C_50001_FindPwdLink").attr("href", EIMS_C_50001.Config.FindPwdPage);
        $("#EIMS_C_50001_RegisterLink").attr("href", EIMS_C_50001.Config.RegisterPage);
    },

    VerifyName: function () {
        var username = $("#EIMS_C_50001_Name").val().trim();
        var nameTip = $("#EIMS_C_50001_NameTip");

        if (IsNullOrEmpty(username)) {
            nameTip.text("用户名不能为空！");
            return false;
        }
        if (username.length < 4) {
            nameTip.text("用户名不能少于4位！");
            return false;
        }

        var isEmail = /^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/;
        var isMobile = /^1[3-8]{1}\d{9}$/;

        if (!isMobile.test(username) && !isEmail.test(username)) {
            nameTip.text("请输入正确的手机号或邮箱！");
            return false;
        }

        nameTip.text("");
        return true;
    },

    VerifyPwd: function () {
        var pwd = $("#EIMS_C_50001_Password").val();
        var pwdTip = $("#EIMS_C_50001_PwdTip");

        if (IsNullOrEmpty(pwd)) {
            pwdTip.text("密码不能为空！");
            return false;
        }

        if (pwd.length < 6) {
            pwdTip.text("密码不能小于6位！");
            return false;
        }

        if (pwd.indexOf(' ') > 0) {
            pwdTip.text("密码不能包含空格！");
            return false;
        }

        pwdTip.text("");
        return true;
    },

    VerifyCode: function () {
        var inCode = $("#EIMS_C_50001_InCode").val();
        var codeTip = $("#EIMS_C_50001_CodeTip");
        if (IsNullOrEmpty(inCode)) {
            codeTip.text("验证码不能为空！");
            return false;
        }
        codeTip.text("");
        return true;
    },

    LoginCheck: function () {
        if (!EIMS_C_50001.VerifyName()) {
            return false;
        }
        if (!EIMS_C_50001.VerifyPwd()) {
            return false;
        }
        if ($("#EIMS_C_50001_checkCodeDiv:visible").length > 0 && !EIMS_C_50001.VerifyCode()) {
            return false;
        }
        return true;
    }
}
/* EIMS_C_50001 End */
/*end_xn_mc_login_2_wrap*/

/*xn_mc_reg_2_wrap*/
$(function () {
    try {
        if ($("#EIMS_C_50002_Panel").length > 0) {
            EIMS_C_50002.Init();
        }
    } catch (err) { }
});

var EIMS_C_50002 = {
    Init: function () {

        $("#EIMS_C_50002_ckbPwd").on("click",function () {
            var htmlTemp;
            var temp = $("#EIMS_C_50002_inputPwd").val();
            if ($(this)[0].checked) {
                htmlTemp = "<input type=text id=EIMS_C_50002_inputPwd runat=server maxlength=20 placeholder=请输入密码 onblur=EIMS_C_50002.CheckPassword() />";
            } else {
                htmlTemp = "<input type=password id=EIMS_C_50002_inputPwd runat=server maxlength=20 placeholder=请输入密码 onblur=EIMS_C_50002.CheckPassword() />";
            }
            $("#EIMS_C_50002_spanPwd").html(htmlTemp);
            $("#EIMS_C_50002_inputPwd").val(temp);
        });

        $("#EIMS_C_50002_btnRegister").on("click",function () {
            if (!EIMS_C_50002.CheckFields()) {
                return false;
            }
            var pwd = $("#EIMS_C_50002_inputPwd").val().trim();
            $("#EIMS_C_50002_txtPwd").val(pwd);
            var username = $("#EIMS_C_50002_txtName").val().trim();
            $("#EIMS_C_50002_txtName").val(username);
        });

        $("#EIMS_C_50002_RegProtocol").on("click", function () {
            $("#EIMS_C_50002_Panel ul").hide();
            $(".EIMS_C_50002_Popup").show();
            $(".xn_mh_reg_ft span").show();
        });

        $("#EIMS_C_50002_Popup_BtnReg").on("click",function () {
            $("#EIMS_C_50002_Panel ul").show();
            $(".EIMS_C_50002_Popup").hide();
            $("#EIMS_C_50002_btnRegister").click();
        });

        $(".xn_mh_reg_ft span").on("click",function () {
            $("#EIMS_C_50002_Panel ul").show();
            $(".EIMS_C_50002_Popup").hide();
            $(".xn_mh_reg_ft span").hide();
        });

    },

    CheckFields: function () {
        if (!EIMS_C_50002.CheckName()) {
            return false;
        }
        if (!EIMS_C_50002.CheckPassword()) {
            return false;
        }
        if (!EIMS_C_50002.CheckCode()) {
            return false;
        }
        return true;
    },

    CheckName: function () {
        var txtName = $("#EIMS_C_50002_txtName").val().trim();
        var tip = $("#EIMS_C_50002_NameTip");

        if (txtName.length == 0) {
            $("#EIMS_C_50002_NameTip").text("请输入您的手机号或邮箱！");
            return false;
        }

        var isEmail = /^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/; //邮箱格式正则
        var isMobile = /^1[3-8]{1}\d{9}$/;
        var method, params, errorTip;

        if (isMobile.test(txtName)) {
            method = "CheckMobile";
            params = { "mobile": txtName };
            errorTip = "手机号已被注册,请重新输入";
        } else if (isEmail.test(txtName)) {
            method = "CheckMail";
            params = { "email": txtName };
            errorTip = "邮箱已被注册,请重新输入";
        } else {
            tip.text("请输入正确的手机号或邮箱！");
            return false;
        }

        var flag = false;
        AjaxMethod("User", method, params, function (data) {
            if (data.result != 1) {
                tip.text(errorTip);
            } else {
                tip.text("");
                flag = true;
            }
        }, null, false);
        return flag;
    },

    CheckPassword: function () {
        var txtPwd = $("#EIMS_C_50002_inputPwd").val();
        var tip = $("#EIMS_C_50002_PwdTips");

        if (txtPwd.length == 0) {
            tip.text("密码不能为空！");
            return false;
        }
        if (txtPwd.length < 6) {
            tip.text("密码至少为6位！");
            return false;
        }

        //判断密码中是否包含空格
        var arr = new Array();
        arr = txtPwd.split(" ");
        if (arr.length > 1) {
            tip.text("密码中不允许输入空格,请重新输入");
            return false;
        }

        if (/[\u4E00-\u9FA5]/i.test(txtPwd)) {
            tip.text("密码中不允许输入中文,请重新输入");
            return false;
        }

        tip.text("");
        return true;
    },

    CheckCode: function () {
        var txtCode = $("#EIMS_C_50002_inCheckCode").val();
        var tip = $("#EIMS_C_50002_CheckCodeTip");

        if (txtCode.length == 0) {
            tip.text("验证码不能为空！");
            return false;
        }
        tip.text("");
        return true;
    }

}
// EIMS_C_50002 End
/*end_xn_mc_reg_2_wrap*/

/*xn_mc_getchapass_2_wrap*/
//EIMS_C_50003 Date:2015/04/24
$(function () {
    try {
        if ($("#EIMS_C_50003_Panel").length > 0) {
            EIMS_C_50003.Init();
        }
    } catch (err) { }
});

var EIMS_C_50003 = {
    Config: {
        RedirectUrl: "/m/getpass.aspx",       //找回密码跳转页面
        ShutDownTime: 60,
        ShutDownTemp: 0
    },

    Init: function () {
        $("#EIMS_C_50003_SendVerity").click(EIMS_C_50003.SendCode);
        $("#EIMS_C_50003_NextStep").click(EIMS_C_50003.VerifyCode);
    },

    SendCode: function () {
        if (!EIMS_C_50003.CheckUserName()) {
            return false;
        }

        var name = $("#EIMS_C_50003_Name").val().trim();
        var method, params;
        if (name.indexOf("@") > 0) {  //发送邮箱验证码
            method = "SendEmailCode";
            params = { "email": name, type: 1 };
        } else if (name.indexOf("@") < 0) {  //发送手机验证码
            method = "SendMobileCode";
            params = { "mobile": name, type: 1 };
        }

        $("#EIMS_C_50003_Name").prop("disabled", true);

        AjaxMethod("User", method, params, function (data) {
            if (data.result != 1) {
                $("#EIMS_C_50003_Name").prop("disabled", false);
                $("#EIMS_C_50003_NameTip").text("获取验证码失败, 原因：" + data.msg);
                return false;
            }
            //禁用按钮一分钟
            EIMS_C_50003.Config.ShutDownTemp = EIMS_C_50003.Config.ShutDownTime;
            $("#EIMS_C_50003_SendVerity").prop("disabled", true);
            $("#EIMS_C_50003_Name").prop("disabled", true);
            EIMS_C_50003.ShowCountDown();
        });

    }, //发送验证码

    CheckUserName: function () {
        var tip = $("#EIMS_C_50003_NameTip");
        var inputName = $("#EIMS_C_50003_Name");
        var name = inputName.val();

        var Email = /^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/;
        var Mobile = /^[1][358]\d{9}$/;

        if (IsNullOrEmpty(name)) {
            tip.text("请输入您的手机号或邮箱！");
            inputName.focus();
            return false;
        }
        if (name.indexOf("@") > 0 && !Email.test(name)) {
            tip.text("邮箱格式不正确，请重新输入！");
            inputName.focus();
            return false;
        }
        if (name.indexOf("@") < 0 && !Mobile.test(name)) {
            tip.text("手机号格式不正确，请重新输入！");
            inputName.focus();
            return false;
        }

        tip.text("");
        return true;
    },

    ShowCountDown: function () {
        if (EIMS_C_50003.Config.ShutDownTemp <= 0) {
            $("#EIMS_C_50003_SendVerity").prop("disabled", false);
            $("#EIMS_C_50003_Name").prop("disabled", false);
            $("#EIMS_C_50003_SendVerity").val("点击获取验证码");
            return;
        }
        $("#EIMS_C_50003_SendVerity").val(" " + EIMS_C_50003.Config.ShutDownTemp + " 秒 ");
        EIMS_C_50003.Config.ShutDownTemp--;
        setTimeout(EIMS_C_50003.ShowCountDown, 1000);
    },

    VerifyCode: function () {
        if (!EIMS_C_50003.CheckUserName()) {
            return false;
        }

        var name = $("#EIMS_C_50003_Name").val();
        var code = $("#EIMS_C_50003_Code").val();

        if (code.length == 0) {
            $("#EIMS_C_50003_CodeTip").text("请输入您接收到的验证码！");
            $("#EIMS_C_50003_Code").focus();
            return false;
        }

        if (code.length < 3) {
            $("#EIMS_C_50003_CodeTip").text("验证码不匹配！");
            $("#EIMS_C_50003_Code").focus();
            return false;
        }

        var method, params;

        if (name.indexOf("@") < 0) {   //发送手机验证码
            method = "CheckMobileCheckCode";
            params = { mobile: name, checkcode: code, seekPwdWay: "mobile" };
        } else {    //发送邮箱验证码
            method = "CheckEmailCheckCode";
            params = { email: name, checkcode: code, seekPwdWay: "email" };
        }

        AjaxMethod("User", method, params, function (data) {
            if (data.result != 1) {
                $("#EIMS_C_50003_CodeTip").text(data.msg);
                return false;
            }
            document.location.href = MergeUrlParas(EIMS_C_50003.Config.RedirectUrl, true, [], []);
        });
    }
}
//EIMS_C_50003 End
/*end_xn_mc_getchapass_2_wrap*/

/*xn_mc_getpass_3_wrap*/
//EIMS_C_50004 V1.0 Date:2015/04/21
$(function () {
    try {
        if ($("#EIMS_C_50004_Panel").length > 0) {
            EIMS_C_50004.Init();
        }
    } catch (err) { }
});

var EIMS_C_50004 = {
    Init: function () {
        $("#EIMS_C_50004_Ckb").click(function () {
            var temp = $('#EIMS_C_50004_Pwd').val();
            "password" == $('#EIMS_C_50004_Pwd').attr("type") ?
                $('#EIMS_C_50004_Span').html("<input id=EIMS_C_50004_Pwd type=text placeholder=请输入新密码 />") :
                $('#EIMS_C_50004_Span').html("<input id=EIMS_C_50004_Pwd type=password placeholder=请输入新密码 />");
            $('#EIMS_C_50004_Pwd').val(temp);
        });

        $("#EIMS_C_50004_Submit").click(function () {
            $('#EIMS_C_50004_NewPwd').val($('#EIMS_C_50004_Pwd').val());
            return EIMS_C_50004.IsEmpty();
        });
    },

    IsEmpty: function () {
        var pwd = $("#EIMS_C_50004_Pwd").val();
        if (IsNullOrEmpty(pwd)) {
            $("#EIMS_C_50004_PwdPrompt").text("密码不能为空！");
            return false;
        }
        if (pwd.length < 6) {
            $("#EIMS_C_50004_PwdPrompt").text("密码至少为6位！");
            return false;
        }
        return true;
    }

}
//EIMS_C_50004 V1.0 End

/*end_xn_mc_getpass_3_wrap*/

/*xn_mc_member_2_wrap*/
/* EIMS_C_50014 V1.0 Date:2015/04/21 begin */
$(function() {
    try {
        if($("#EIMS_C_50014_Panel").length > 0)
        {
            EIMS_C_50014.Init();
        };
    } catch (err) {
        alert(err);
    }
});

var EIMS_C_50014 = {
    Config: {
        balanceUrl: "/m/balance.aspx",
        indexUrl: "/m/index.aspx",
        LogOutUrl: "/m/login.aspx",
        UserInfoUrl: "/m/pdata.aspx",
        ChangePwdUrl: "/m/changepass.aspx",
        MyOrderUrl: "/m/orlist.aspx",
        MyAddressUrl: "/m/recadd.aspx",
        SetPayPwdUrl: "/m/setpay.aspx"

    },
    Init: function() {
        $(document).on("click", "#EIMS_C_50014_Balance", function () { location.href = EIMS_C_50014.Config.balanceUrl; });
        $(document).on("click", "#EIMS_C_50014_Index", function () { location.href = EIMS_C_50014.Config.indexUrl; });

        $(document).on("click", "#EIMS_C_50014_UserDes", function() { Mobilebone.ajax({ url: EIMS_C_50014.Config.UserInfoUrl }); });
        $(document).on("click", "#EIMS_C_50014_ChangePwd", function() { Mobilebone.ajax({ url: EIMS_C_50014.Config.ChangePwdUrl });});

        $(document).on("click", "#EIMS_C_50014_MyOrder", function () { location.href = EIMS_C_50014.Config.MyOrderUrl; });
        $(document).on("click", "#EIMS_C_50014_MyAddress", function () { location.href = EIMS_C_50014.Config.MyAddressUrl; });

        $(document).on("click", ".EIMS_C_50014_Status ul li a", function () { location.href = EIMS_C_50014.Config.MyOrderUrl + "?Status=" + $(this).attr("status"); });

        $('#EIMS_C_50014_ImgPhoto').bind('click', function() { //点击图片 触发选择文件
            $('#EIMS_C_50014_Photofile').click();
        });

        $("#EIMS_C_50014_setpayPwd").attr("href",EIMS_C_50014.Config.SetPayPwdUrl).attr("data-ajax",false);

        $("#EIMS_C_50014_Photofile").change(EIMS_C_50014.UploadFile); //自动触发文件上传

        $(document).on("click", "#EIMS_C_50014_UserCenter_LoginOut", function() {
            AjaxMethod("User", "Logout", null, function(data) {
                if (IsNullOrEmpty(data)) {
                    return false;
                }
                if (data == "ok") {
                    location.href = EIMS_C_50014.Config.LogOutUrl;
                    return true;
                }

            });
        });
    },
    UploadFile: function() { //上传文件

        var fName = $(this).val();
        if (fName == "") {
            return false;
        }
        var fType = fName.substring(fName.lastIndexOf(".")).toLocaleLowerCase();
        var errMsg = "";
        if (!/.(gif|jpg|jpeg|png)$/.test(fType)) {
            errMsg = "图片类型必须是gif，jpeg，jpg或png中的一种";
        } else {
            if ($(this)[0].files != null) {
                // 判断文件大小
                if ($(this)[0].files[0].size > 1024 * 1024 * 2)
                    errMsg = "请上传大小小于2M的图片";
            }
        }
        if (errMsg != "") {
            $(this).val("");
            alert(errMsg);
            return false;
        }


        //创建FormData对象
        var formData = new FormData();
        //为FormData对象添加数据
        $.each($('#EIMS_C_50014_Photofile')[0].files, function(i, file) {
            formData.append('imgFile', file);
        });
        $.ajax({
            url: '/Admin/JScript/kindeditor_upload.ashx',
            type: 'POST',
            data: formData,
            cache: false,
            contentType: false, //不可缺
            processData: false, //不可缺
            dataType: 'json',
            success: function(data) {
                //此处修改本页面的头像
                if (data.error == 0) {
                    $('#EIMS_C_50014_ImgPhoto').attr('src', data.url);
                    EIMS_C_50014.ChangeUserPhoto(data.url);
                } else {
                    alert(data.message);
                }

            }
        });
    },
    ChangeUserPhoto: function(imgSrc) {
        var imgData = { ImgSrc: imgSrc };
        AjaxMethod("User", "UpdateUserPhoto", imgData, function(data) {
            if (IsNullOrEmpty(data)) {
                return false;
            }

            if (data.result == 1) {

                return true;
            } else {
                alert(data.msg);
                return false;
            }

        });
    }
};
/* EIMS_C_50014 end */
/*end_xn_mc_member_2_wrap*/

/*xn_mc_pdata_1_wrap*/
/* EIMS_C_50017 V1.0 Date:2015/04/22 begin */
$(function() {
    try {
        if($("#EIMS_C_50017_Panel").length > 0)
        {
            EIMS_C_50017.Init();
        };
    } catch (err) {
    }
});

var EIMS_C_50017 = {
    Config: {
        CheckType: 1,//验证类型 1手机 0邮箱
        ActiveEmail:"/m/smsv.aspx",//用于激活邮箱的的url地址
        ActivePhone: "/m/emlv.aspx"//用于激活手机的的url地址
    },
    Init: function() {
        $(".EIMS_50017_ActivationBlockDefault,.EIMS_50017_ActivationBlockRed").click(function() {
            EIMS_C_50017.OpenAlert(this);
        });
    },
    //跳转Url
    OpenAlert: function (obj) {
        EIMS_C_50017.Config.CheckType = $(obj).attr('validType');
        if (EIMS_C_50017.Config.CheckType == 1) {//如果是手机验证
            location.href = EIMS_C_50017.Config.ActivePhone;
        } else {
            location.href = EIMS_C_50017.Config.ActiveEmail;
        }
    }
};
/* EIMS_C_50017 end */
/*end_xn_mc_pdata_1_wrap*/

/*xn_mc_pdatav_1_wrap*/
/* EIMS_C_50017 V1.0 Date:2015/04/22 begin */
$(function () {
    try {
        if($("#EIMS_C_50017_1_Panel").length > 0)
        {
            EIMS_C_50017_1.Init();
        };
    } catch (err) {
    }
});

var EIMS_C_50017_1 = {
    Config: {
        RadioSexValue: 1,
        BackHref: '/m/pdata.aspx'
    },
    Init: function () {
        EIMS_C_50017_1.RadioCheck();

        $('#EIMS_C_50017_UserChangeBtn').bind('click', function () {
            EIMS_C_50017_1.ChangeUserInfo();
        });

        $('.EIMS_C_50017_UserPreviewUserInfo table tr td input').each(function () { //记录原始样式
            $(this).data('defaultBorderCss', $(this).css('border'));
        });

        if (($("#EIMS_C_50017_IsValidMail").val() == "False" || $("#EIMS_C_50017_IsValidMail").val() == "") || $("#EIMS_C_50017_Email").val() == "") {
            $("#EIMS_C_50017_Email").removeAttr("disabled");
        }
        if ($("#EIMS_C_50017_Mobile").val() == "" || ($("#EIMS_C_50017_IsValidMobile").val() == "False" || $("#EIMS_C_50017_IsValidMobile").val() == "")) {
            $("#EIMS_C_50017_Mobile").removeAttr("disabled");
        }

    },

    RadioCheck: function () {

        EIMS_C_50017_1.Config.RadioSexValue = $("#EIMS_C_50017_hidSex").val();

        var sex = EIMS_C_50017_1.Config.RadioSexValue;
        if (sex == "0" || sex == "1") {
            $("#EIMS_C_50017_1_SexPanel input[name='EIMS_50017_1_Sex'][value=" + sex + "]").attr("checked", "checked");
        }

        $("#EIMS_C_50017_1_SexPanel input[type='radio']").change(function (obj) {
            EIMS_C_50017_1.Config.RadioSexValue = $(this).attr("value");
        });

    }, //
    IsEmail: function () {
        var mail = $('#EIMS_C_50017_Email');
        var regularEmail = /^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/;

        if (mail.attr("disabled") == "disabled") {
            return true;
        }

        var isOk = false;
        if (mail.val() != "") {
            if (!regularEmail.test(mail.val())) {
                alert('邮箱格式不正确');
                return false;
            }

            var dataMail = { email: mail.val() };
            AjaxMethod("User", "CheckMail", dataMail, function (data) {
                if (IsNullOrEmpty(data)) {
                    isOk = false;
                }
                if (data.result != "1") {
                    alert(data.msg);
                    isOk = false;
                } else {
                    isOk = true;
                }

            }, null, false);
        } else {
            alert('邮箱不能为空');
            isOk = false;
        }

        return isOk;
    }, //验证邮箱

    IsMobile: function (tag) {
        var regularMobile = /^[1][3-9]\d{9}$/; //11位数字
        var phone = $('#EIMS_C_50017_Mobile');

        if (phone.attr("disabled") == "disabled") {
            return true;
        }
        var isOk = false;
        if (phone.val() != "") {
            if (!regularMobile.test(phone.val())) {
                alert('手机号码格式不正确');
                return false;
            }

            var dataPhone = { mobile: phone.val() };
            AjaxMethod("user", "CheckMobile", dataPhone, function (data) {
                if (IsNullOrEmpty(data)) {
                    isOk = false;
                }
                if (data.result != "1") {
                    alert(data.msg);
                    isOk = false;
                } else {
                    isOk = true;
                }

            }, null, false);
        } else {
            alert('手机号码不能为空');
            isOk = false;
        }
        return isOk;
    }, //验证手机

    ChangeUserInfo: function () {
        if (!EIMS_C_50017_1.IsEmail()) {
            return false;
        }
        if (!EIMS_C_50017_1.IsMobile()) {
            return false;
        }

        var name = $("#EIMS_C_50017_reallyName").val();
        var mobile = $("#EIMS_C_50017_Mobile").val();
        var telePhone = $("#EIMS_C_50017_telePhone").val();
        var email = $("#EIMS_C_50017_Email").val();
        var qq = $("#EIMS_C_50017_qq").val();
        var address = $("#EIMS_C_50017_Address").val();

        var userInfoData = {
            Name: name,
            Sex: EIMS_C_50017_1.Config.RadioSexValue,
            Mobile: mobile,
            telePhone: telePhone,
            Email: email,
            QQ: qq,
            deAddress: address
        };

        AjaxMethod("User", "Update", userInfoData, function (data) {
            if (IsNullOrEmpty(data)) {
                return false;
            }

            if (data.result == 1) {
                alert("个人信息修改成功");
                location.href = EIMS_C_50017_1.Config.BackHref;
                return true;
            } else {
                alert(data.msg);
                return false;
            }
        });
    }
}
/* EIMS_C_50017 end */
/*end_xn_mc_pdatav_1_wrap*/

/*xn_mc_changepass_2_wrap*/
/* EIMS_C_50018 V1.0 Date:2015/04/22 begin */
$(function() {
    try {
        if($("#EIMS_C_50018_Panel").length > 0)
        {
            EIMS_C_50018.Init();
        };
    } catch (err) {
        alert(err);
    }
});

var EIMS_C_50018 = {
    Config: {
    },
    Init: function () {
        $('#EIMS_C_50018_UserChangePwd_ShowPWD').click(EIMS_C_50018.ShowPassword); //显示密码

        $('#EIMS_C_50018_UserChangePwd_Btn').click(EIMS_C_50018.ChangePwd); //修改新密码

    },
    ShowPassword: function () { //显示密码
        /*"password" == $('#password').attr("type") ? $('#password').attr("type", "text") : $('#password').attr("type", "password") }*/
        if ("password" == $('#EIMS_C_50018_UserChangePwd_NewPWD').attr("type")) {
            $('#EIMS_C_50018_UserChangePwd_NewPWD').prop("type", "text");
        } else {
            $('#EIMS_C_50018_UserChangePwd_NewPWD').prop("type", "password");
        }
    },
    CheckOldPwd: function () {
        var pwdOld = $("#EIMS_C_50018_UserChangePwd_OldPWD").val();

        if (IsNullOrEmpty(pwdOld)) {
            alert("旧密码不能为空！");
            return false;
        } else if (pwdOld.indexOf(" ") >= 0) {
            alert("旧密码不能包含空格！");
            return false;
        } else if (pwdOld.length < 6 || pwdOld.length > 20) {
            alert("旧密码长度应在6-20位之间！");
            return false;
        }

        return true;
    },
    CheckNewPwd: function () {
        var pwd = $("#EIMS_C_50018_UserChangePwd_NewPWD").val();

        if (IsNullOrEmpty(pwd)) {
            alert('新密码不能为空！');
            return false;
        } else if (pwd.indexOf(" ") >= 0) {
            alert("新密码不能包含空格！");
            return false;
        } else if (pwd.length < 6 || pwd.length > 20) {
            alert("新密码长度应在6-20位之间！");
            return false;
        }
        if (/[\u4E00-\u9FA5]/i.test(pwd)) {
            tip.text("密码中不允许输入中文,请重新输入");
            return false;
        }

        return true;
    },
    ChangePwd: function () { //修改密码

        if (!EIMS_C_50018.CheckOldPwd()) {
            return false;
        }
        if (!EIMS_C_50018.CheckNewPwd()) {
            return false;
        }

        var oldPwd = $("#EIMS_C_50018_UserChangePwd_OldPWD").val();
        var newPwd = $("#EIMS_C_50018_UserChangePwd_NewPWD").val();

        var userInfoData = {
            oldPwd: oldPwd,
            newPwd: newPwd
        };

        AjaxMethod("User", "UpdatePwd", userInfoData, function (data) {
            if (IsNullOrEmpty(data)) {
                return false;
            }

            if (data.result == 1) {
                alert('密码修改成功');
                Mobilebone.transition($("#EIMS_C_50014_Panel")[0], $("#EIMS_C_50018_ChangePWD")[0], true);
                return true;
            } else {
                alert(data.msg);
                return false;
            }
        });
        return true;
    }
}
/* EIMS_C_50018 end */
/*end_xn_mc_changepass_2_wrap*/

/*xn_mc_recadd_1_wrap*/
$(function () {
    try {
        if($("#EIMS_C_50019_Panel").length > 0)
        {
            EIMS_C_50019.Init();
        };
    } catch (err) { }
});

var EIMS_C_50019 = {
    Config: {
        MemberLink: "/m/member.aspx",
        addressList: [], //收货地址列表
        provinceArray: [],  //省
        cityArray: [],      //市
        areaArray: [],  //区
        addressCPCA: {} //{nid:1,pid:,cid:,aid:}//CPCA:Country Province City Area
    },

    Init: function () {

        $("#EIMS_C_50019_MemberLink").on("click", function () {
            window.location.href = EIMS_C_50019.Config.MemberLink;
        });

        try {
            if (nations) {
                EIMS_C_50019.LoadCPCA();    //加载省市区数据
                EIMS_C_50019.GetAddressList();    //加载用户收货地址列表
                EIMS_C_50019.BindEvents_OnceAndForAll();
            }
        }
        catch (err) {
            $.ajaxSetup({ cache: true, async: false });

            $.getScript("/Js/ChinaArea.js").done(function () {
                EIMS_C_50019.LoadCPCA();
                EIMS_C_50019.GetAddressList();
                EIMS_C_50019.BindEvents_OnceAndForAll();
            }).fail(function () {

            });
        }
    },

    LoadCPCA: function () {
        //省市区暂时只考虑国内
        if (IsNullOrEmpty(nations)) {
            return;
        }
        var provinces = nations[0].provinces; //获取国内省市区信息

        $(provinces).each(function (i, p) {//省
            var pArray = [p.pId, p.pn, p.p_en]; //省信息
            EIMS_C_50019.Config.provinceArray[EIMS_C_50019.Config.provinceArray.length] = pArray;

            $(p.cities).each(function (j, c) {//市
                var cArray = [p.pId, c.cId, c.cn, c.c_en]; //市信息
                EIMS_C_50019.Config.cityArray[EIMS_C_50019.Config.cityArray.length] = cArray;

                $(c.areas).each(function (k, a) {//省
                    var aArray = [p.pId, c.cId, a.aId, a.an, a.a_en];
                    EIMS_C_50019.Config.areaArray[EIMS_C_50019.Config.areaArray.length] = aArray;
                });
            });
        });
    },

    GetAddressList: function () {
        AjaxMethod("deliveryaddress", "Get", null, function (data) {
            if (!data && data.result == 0) {
                $("#EIMS_C_50019_HomePageAddrList").html("无收货地址");
                return;
            }
            EIMS_C_50019.Config.addressList = data.msg;
            EIMS_C_50019.RefreshAddressList();
        });
    },

    RefreshAddressList: function () {
        var addressList = EIMS_C_50019.Config.addressList;
        if (addressList.length < 1) { return; }

        $("#EIMS_C_50019_HomePageAddrList").html("");
        $("#EIMS_C_50019_SettingPageAddrList").html("");

        var p = "", c = "", a = "";
        for (var i = 0; i < addressList.length; i++) {
            p = c = a = "";
            //获取当前收货地址省市区名称
            for (var j = 0; j < EIMS_C_50019.Config.provinceArray.length; j++) {
                if (addressList[i].ProvinceId == EIMS_C_50019.Config.provinceArray[j][0]) {
                    p = EIMS_C_50019.Config.provinceArray[j][1];

                    for (var k = 0; k < EIMS_C_50019.Config.cityArray.length; k++) {
                        if (addressList[i].CityId == EIMS_C_50019.Config.cityArray[k][1]) {
                            c = EIMS_C_50019.Config.cityArray[k][2];

                            for (var m = 0; m < EIMS_C_50019.Config.areaArray.length; m++) {
                                if (addressList[i].AreaId == EIMS_C_50019.Config.areaArray[m][2]) {
                                    a = EIMS_C_50019.Config.areaArray[m][3];
                                    break;
                                }
                            }
                            break;
                        }
                    }
                    break;
                }
            }

            var isdefault = false;    //兼容mysql,sqllite
            if (addressList[i].IsDefault == "1" || addressList[i].IsDefault == "True") {
                isdefault = true;
            }

            var homepageHtml = "<p bindid=" + addressList[i].Id;
            homepageHtml += isdefault ? " class = EIMS_C_50019_DefaultAddress><span>" : "><span>";
            homepageHtml += addressList[i].Contacter + "</span><span>" + addressList[i].Mobile + "</span><span>";
            homepageHtml += p + "-" + c + "-" + a + addressList[i].Address + "</span></p>";
            $("#EIMS_C_50019_HomePageAddrList").append(homepageHtml);

            var settingpageHtml = "<li bindid=" + addressList[i].Id + ">"
                + "<div class=EIMS_C_50019_IconDelete></div>"
                + "<div class=EIMS_C_50019_SetAddress>"
                + "<div class=EIMS_C_50019_SetAddr><span>" + addressList[i].Contacter + "</span><span>" + addressList[i].Mobile
                + "</span><span class=EIMS_C_50019_AddrCPCA data-original=" + p + c + a + ">" + p + "-" + c + "-" + a + "<i>" + addressList[i].Address + "</i></span></div>"
                + "<span class=EIMS_C_50019_RightArrow><img src=images/controls/down.svg></span>"
                + "</div></li>";
            $("#EIMS_C_50019_SettingPageAddrList").append(settingpageHtml);
        }
        EIMS_C_50019.BindEvents_Dynamically();
    },

    BindEvents_Dynamically: function () {

        //设置默认收货地址
        $("#EIMS_C_50019_HomePageAddrList p").on("click", function () {
            var newDefault = $(this);
            var addressId = newDefault.attr("bindid");
            if (addressId <= 0) return;
            AjaxMethod("DeliveryAddress", "SetDefault", { "id": addressId }, function () {
                var oldDefault = $("#EIMS_C_50019_HomePageAddrList .EIMS_C_50019_DefaultAddress");
                oldDefault.removeClass("EIMS_C_50019_DefaultAddress");
                newDefault.addClass("EIMS_C_50019_DefaultAddress");
                newDefault.prependTo($("#EIMS_C_50019_HomePageAddrList"));    //移到第一个位置
            });
        });

        //删除地址事件绑定
        $(".EIMS_C_50019_IconDelete").on("click", function () {
            var wrapper = $(this).parent();    //获取要删除的行
            if (confirm("确认删除？")) {
                EIMS_C_50019.DeleteAddress(wrapper);
            }
        });

        //设置页面修改图标点击事件绑定
        $(".EIMS_C_50019_RightArrow").on("click", function () {
            var addressId = $(this).parents("li").attr("bindid");
            var addrCPCA_CN = $(this).prev().children(".EIMS_C_50019_AddrCPCA").attr("data-original");
            var address;
            var addressList = EIMS_C_50019.Config.addressList;
            for (var i = 0; i < addressList.length; i++) {
                if (addressList[i].Id == addressId) {
                    address = addressList[i];
                    break;
                }
            }
            if (address) {
                EIMS_C_50019.InitModifyPage(address, addrCPCA_CN);
            }
        });
    },

    BindEvents_OnceAndForAll: function () {
        $(".EIMS_C_50019_AddNewAddress").on("click", function () {
            $("#EIMS_C_50019_NewAddrDiv input").not("[type=button]").val("");
            EIMS_C_50019.Config.addressCPCA = {};
            $(".EIMS_C_50019_AddressDiv").hide();
            Mobilebone.transition($("#EIMS_C_50019_PageAdd")[0], $("#EIMS_C_50019_PageHome")[0]); //滑动到主页面
        });

        //点击省市区文本框弹出选项
        $(".EIMS_C_50019_Position").on("click", function () {
            var wrapper = $(this).parent();

            var placelist = wrapper.find(".EIMS_C_50019_BottomContent");
            placelist.html("");

            EIMS_C_50019.GetProvinces(placelist);
            EIMS_C_50019.SetDivHeight(wrapper);

            wrapper.children(".EIMS_C_50019_AddressDiv").slideDown();
        });

        //关闭省市区弹出
        $(".EIMS_C_50019_Close").on("click", function () {
            $(".EIMS_C_50019_AddressDiv").slideUp();
        });

        //新增收货地址
        $("#EIMS_C_50019_New").on("click", EIMS_C_50019.AddAddress);
        //修改收货地址
        $("#EIMS_C_50019_Modify").on("click", EIMS_C_50019.ModifyAddress);
    },

    InitModifyPage: function (address, addrCPCA_CN) {
        EIMS_C_50019.Config.addressCPCA = { nid: address.CountryId, pid: address.ProvinceId, cid: address.CityId, aid: address.AreaId };
        $("#EIMS_C_50019_Id").val(address.Id);
        $("#EIMS_C_50019_Contacter").val(address.Contacter);
        $("#EIMS_C_50019_Mobile").val(address.Mobile);
        $("#EIMS_C_50019_Province").val(addrCPCA_CN);
        $("#EIMS_C_50019_DetailAddress").val(address.Address);
        $("#EIMS_C_50019_PostCode").val(address.PostCode);
        Mobilebone.transition($("#EIMS_C_50019_PageModify")[0], $("#EIMS_C_50019_PageSet")[0]);
    },

    ////////////////////////////// 收货地址增删改 Start /////////////////////////////////

    AddAddress: function () {

        var contacter = $("#EIMS_C_50019_Consignee").val();
        if (IsNullOrEmpty(contacter)) {
            alert("请输入收货人");
            return;
        }

        var mobile = $("#EIMS_C_50019_Tel").val();
        if (IsNullOrEmpty(mobile)) {
            alert("请输入手机号码");
            return;
        }

        if (!/^[1][3-9]\d{9}$/.test(mobile)) {
            alert("手机号码格式不正确");
            return;
        }

        if (EIMS_C_50019.Config.addressCPCA.aid == null) {
            alert("请选择省市区");
            return;
        }

        var detailAddr = $("#EIMS_C_50019_DetailAddr").val();
        if (IsNullOrEmpty(detailAddr)) {
            alert("请输入详细地址");
            return;
        }

        var zipcode = $("#EIMS_C_50019_ZipCode").val();
        if (!IsNullOrEmpty(zipcode) && !/^[0-9]{6}$/.test(zipcode)) {
            $("#EIMS_C_50019_ZipCode").focus();
            alert("邮政编码格式不正确");
            return;
        }

        var data = {
            nid: 1, //国家：中国
            pid: EIMS_C_50019.Config.addressCPCA.pid,  //省、直辖市
            cid: EIMS_C_50019.Config.addressCPCA.cid,  //市区
            aid: EIMS_C_50019.Config.addressCPCA.aid,  //区县
            address: detailAddr,   //详细地址
            mobile: mobile,
            contacter: contacter,  //收货人
            zip: zipcode   //邮编
        };
        AjaxMethod("deliveryaddress", "Add", data, function (data) {
            if (data && data.result == 1) {
                EIMS_C_50019.Config.addressList = data.msg;
                EIMS_C_50019.RefreshAddressList();
                alert("添加成功！");
                Mobilebone.transition($("#EIMS_C_50019_PageHome")[0], $("#EIMS_C_50019_PageAdd")[0], true); //滑动到主页面
            } else {
                alert("添加失败，请稍后重试！");
            }
        });
    },

    DeleteAddress: function (wrapper) {
        var addressList = EIMS_C_50019.Config.addressList;
        var addressId = wrapper.attr("bindid");
        AjaxMethod("deliveryaddress", "Delete", { id: addressId }, function (data) {
            if (data) {
                if (data.result == 1) {
                    wrapper.remove();
                    $("#EIMS_C_50019_HomePageAddrList").find("p[bindid=" + addressId + "]").remove();
                    for (var i = 0; i < addressList.length; i++) {
                        if (addressList[i].Id == addressId) {
                            addressList.splice(i, 1);
                            break;
                        }
                    }
                } else {
                    alert(data.msg);
                }
            }
        });
    },

    ModifyAddress: function () {

        var contacter = $("#EIMS_C_50019_Contacter").val();
        if (IsNullOrEmpty(contacter)) {
            alert("请输入收货人");
            return;
        }

        var mobile = $("#EIMS_C_50019_Mobile").val();
        if (IsNullOrEmpty(mobile)) {
            alert("请输入手机号码");
            return;
        }

        if (!/^[1][3-9]\d{9}$/.test(mobile)) {
            alert("手机号码格式不正确");
            return;
        }

        if (EIMS_C_50019.Config.addressCPCA.aid == null) {
            alert("请选择省市区");
            return;
        }

        var detailAddr = $("#EIMS_C_50019_DetailAddress").val();
        if (IsNullOrEmpty(detailAddr)) {
            alert("请输入详细地址");
            return;
        }

        var postcode = $("#EIMS_C_50019_PostCode").val();
        if (!IsNullOrEmpty(postcode) && !/^[0-9]{6}$/.test(postcode)) {
            $("#EIMS_C_50019_PostCode").focus();
            alert("邮政编码格式不正确");
            return;
        }

        var jsonParam = {
            id: $("#EIMS_C_50019_Id").val(),
            contacter: contacter,
            mobile: mobile,
            nid: EIMS_C_50019.Config.addressCPCA.nid,
            pid: EIMS_C_50019.Config.addressCPCA.pid,
            cid: EIMS_C_50019.Config.addressCPCA.cid,
            aid: EIMS_C_50019.Config.addressCPCA.aid,
            address: detailAddr,
            zip: postcode
        };

        AjaxMethod("deliveryaddress", "Update", jsonParam, function (data) {
            if (data) {
                if (data.result == 1) {
                    EIMS_C_50019.Config.addressList = data.msg;
                    EIMS_C_50019.RefreshAddressList();
                    alert("修改成功");
                    Mobilebone.transition($("#EIMS_C_50019_PageSet")[0], $("#EIMS_C_50019_PageModify")[0], true); //滑动到设置界面
                } else {
                    alert(data.msg);
                }
            }
        });
    },
    ////////////////////////////// 收货地址增删改 End /////////////////////////////////

    ////////////////////////////// 省市区级联选择 Start /////////////////////////////////

    SetDivHeight: function (wrapper) {
        var addressP = wrapper.find(".EIMS_C_50019_Position").next();
        var limitHeight = $(window).height() - addressP.offset().top;
        var addressDiv = wrapper.find(".EIMS_C_50019_AddressDiv");
        addressDiv.height(limitHeight);

        var innerHeight = limitHeight - 44;
        var innerDiv = wrapper.find(".EIMS_C_50019_BottomContent");
        innerDiv.height(innerHeight);
    },

    GetProvinces: function (placelist) {

        var provinces = EIMS_C_50019.Config.provinceArray;
        placelist.html("");
        $.each(provinces, function (i) {
            placelist.append("<p bindid=" + provinces[i][0] + ">" + provinces[i][1] + "</p>");
        });

        var addressInput = placelist.parent().siblings(".EIMS_C_50019_Position").children(".EIMS_C_50019_Address");

        placelist.children("p").on("click", function () {
            var provinceId = $(this).attr("bindid");
            EIMS_C_50019.Config.addressCPCA.pid = provinceId;
            addressInput.val($(this).text());
            EIMS_C_50019.GetCities(provinceId, placelist);
        });
    },

    GetCities: function (provinceId, placelist) {

        var cities = EIMS_C_50019.Config.cityArray;
        placelist.html("");
        $.each(cities, function (i) {
            if (cities[i][0] == provinceId) {
                placelist.append("<p bindid=" + cities[i][1] + ">" + cities[i][2] + "</p>");
            }
        })

        var addressInput = placelist.parent().siblings(".EIMS_C_50019_Position").children(".EIMS_C_50019_Address");
        placelist.children("p").on("click", function () {
            var cityId = $(this).attr("bindid");
            EIMS_C_50019.Config.addressCPCA.cid = cityId;
            addressInput.val(addressInput.val() + $(this).text());
            EIMS_C_50019.GetAreas(cityId, placelist);
        });
    },

    GetAreas: function (cityId, placelist) {

        placelist.html("");
        var areas = EIMS_C_50019.Config.areaArray;

        $.each(areas, function (i) {
            if (areas[i][1] == cityId) {
                placelist.append("<p bindid=" + areas[i][2] + ">" + areas[i][3] + "</p>");
            }
        });

        var addressInput = placelist.parents(".EIMS_C_50019_Content").find(".EIMS_C_50019_Address")
        placelist.children("p").on("click", function () {
            var areaId = $(this).attr("bindid");
            EIMS_C_50019.Config.addressCPCA.aid = areaId;
            placelist.parent().slideUp();
            addressInput.val(addressInput.val() + $(this).text());
        });
    }

    ////////////////////////////// 省市区级联选择 End /////////////////////////////////

}
/*end_xn_mc_recadd_1_wrap*/

/*xn_mc_orlist_1_wrap*/
/* EIMS_C_50015 V1.0 Date:2015/04/28 begin */
$(function() {
    try {
        if($("#EIMS_C_50015_Panel").length > 0)
        {
            EIMS_C_50015.Init();
        };
    } catch (err) {
    }
    var order_ul = $("#EIMS_C_50015_OrderStatusPanel");
    var order_li = $("#EIMS_C_50015_OrderStatusPanel li");
    var order_li_len = order_li.length;
    var order_li_w = order_li.outerWidth(true);
    order_ul.css("width",order_li_len*order_li_w);
});

var EIMS_C_50015 = {
    Config: {
        PageIndex: 1,
        PageSize: 2,
        DefaultStutus: "1,3,4,5,-2",
        SearchInfo: "",
        ToOrderDetail: "/m/orlist_view.aspx",
        ToOrderPayUrl: "/m/spcstep3.aspx",
        ToCarriageUrl: "/m/logist_view.aspx",
        ToProductUrl: "/m/prod_view.aspx"
    },
    Init: function () {

        $(document).on("error", "#EIMS_C_50015_Panel img", function () {
            $(this).attr('src', "../images/img_loading.png");
        });

        $('#EIMS_C_50015_BtnSearch').click(EIMS_C_50015.ShowSearch);

        var height = $(window).height();
        EIMS_C_50015.Config.PageSize = parseInt((height / 190).toFixed(0));

        var status = QueryString("Status");
        if (IsNullOrEmpty(status)) {
            EIMS_C_50015.LoadData();
        } else {
            EIMS_C_50015.LoadData(status);
            EIMS_C_50015.ScrollPage();
        }

        $("#EIMS_C_50015_MoreOrder a").click(function () {//加载更多数据
            $("#EIMS_C_50015_MoreOrder").show();
            var oldIndex = EIMS_C_50015.Config.PageIndex;
            EIMS_C_50015.Config.PageIndex += 1;
            if ((EIMS_C_50015.Config.PageIndex - oldIndex) == 1) {
                EIMS_C_50015.LoadData(EIMS_C_50015.Config.DefaultStutus, 1);
            }
            return false;
        });

        $('#EIMS_C_50015_OrderStatusPanel a').click(function () {
            EIMS_C_50015.Config.PageIndex = 1;
            $('#EIMS_C_50015_OrderDetail').html('');
            $('#EIMS_C_50015_EmptyOrder').hide();
            var status = $(this).attr('data-status');
            $("#EIMS_C_50015_MoreOrder").show();
            EIMS_C_50015.LoadData(status);
            EIMS_C_50015.ScrollPage();
        });

        $('#EIMS_C_50015_btnSearch').click(function () {
            EIMS_C_50015.Config.PageIndex = 1;
            $('#EIMS_C_50015_OrderDetail').html('');
            $('#EIMS_C_50015_EmptyOrder').hide();
            $("#EIMS_C_50015_MoreOrder").show();
            EIMS_C_50015.LoadData(EIMS_C_50015.Config.DefaultStutus, 1);
            EIMS_C_50015.ScrollPage();
        });

        EIMS_C_50015.ScrollPage();
    },
    /*搜索框*/
    ShowSearch: function () {
        if ($('#EIMS_C_50015_Search').css('display') == 'block') {
            $('#EIMS_C_50015_Search').fadeOut("slow");
            $('#EIMS_C_50015_Search input[type="text"]').val('');
        } else {
            $('#EIMS_C_50015_Search').fadeIn("slow");
        }
    },
    /*Ajax加载数据*/
    LoadData: function (status, type) {
        if (status) {
            $(".EIMS_C_50015_CurrentStatus").removeClass("EIMS_C_50015_CurrentStatus");
            if (status.indexOf(',') > 0) {
                $("#EIMS_C_50015_OrderStatusPanel li:first").addClass("EIMS_C_50015_CurrentStatus");
            } else {
                $("#EIMS_C_50015_OrderStatusPanel [data-status=" + status + "]").parent().addClass("EIMS_C_50015_CurrentStatus").siblings().removeClass("EIMS_C_50015_CurrentStatus");
            }
        }else{
            $("#EIMS_C_50015_OrderStatusPanel li:first").addClass("EIMS_C_50015_CurrentStatus");
        }

        var orderDaata = {};

        type = type == undefined ? 0 : 1;

        EIMS_C_50015.Config.SearchInfo = $('#EIMS_C_50015_SearchInput').val();

        if (status == undefined) {
            orderDaata = { pageIndex: EIMS_C_50015.Config.PageIndex, pagesize: EIMS_C_50015.Config.PageSize, Key: EIMS_C_50015.Config.SearchInfo, orderStatus: EIMS_C_50015.Config.DefaultStutus };
        } else {

            EIMS_C_50015.Config.DefaultStutus = status;
            orderDaata = { pageIndex: EIMS_C_50015.Config.PageIndex, pagesize: EIMS_C_50015.Config.PageSize, Key: EIMS_C_50015.Config.SearchInfo, orderStatus: EIMS_C_50015.Config.DefaultStutus };
        }


        AjaxMethod("order", "GetUserOrders", orderDaata, function (data) {
            var json = eval(data);

            if (data.msg == "!") {
                if (type) {
                    $('#EIMS_C_50015_EmptyOrder').html('没有更多数据了！');
                    $('#EIMS_C_50015_EmptyOrder').show();
                    $("#EIMS_C_50015_MoreOrder").hide();
                    $(window).unbind("scroll");
                } else {
                    $('#EIMS_C_50015_EmptyOrder').html('暂无数据！');
                    $('#EIMS_C_50015_EmptyOrder').show();
                    $("#EIMS_C_50015_MoreOrder").hide();
                    $(window).unbind("scroll");
                }

                return false;
            }

            var html = "";
            //循环订单信息
            $(json.msg).each(function (index, item) {
                html += " <article class=\"EIMS_C_50015_repAll\" id='EIMS_C_50015_OrderId" + item.Id + "'>";
                html += "                    <div class=\"EIMS_C_50015_IntegralList\">";
                html += "                        <ul data_orderstaid=\'\'>";
                html += "                            <li class=\"EIMS_C_50015_proli1\"><span>订单编号</span>："+item.OrderNo+"</li>";
                html += "                            <li class=\"EIMS_C_50015_proli2\">"+item.DateTime+"</li>";
                html += "                            <li class=\"EIMS_C_50015_proli3\"> <span class=\"EIMS_C_50015_OrderStatusSpan\">" + item.StatusName + "</span></li>";
                //循环商品信息
                var allProducts = eval(item.AllProducts);
                $(allProducts).each(function (i, t) {
                    html += "                            <li class=\"EIMS_C_50015_proli4\">";
                    html += "                                <div class=\"EIMS_C_50015_proimg\">";
                    html += "                                   ";
                    html += "                                    <img src=\"" + t.SmallImageUrl + "\" /> ";
                    html += "                                </div>";
                    html += "                                <div class=\"EIMS_C_50015_pronamewarp\">";
                    html += "                                    <div class=\"EIMS_C_50015_proname\">";
                    html += "                                       <span class='EIMS_C_50015_ProductName'><a href='" + EIMS_C_50015.Config.ToProductUrl + "?Id=" + t.Id + "'>" + t.AliaName + "</a></span>";
                    html += "                                    </div>";
                    html += "                                    <div class=\"EIMS_C_50015_pricetex\">";
                    html += "                                        <span class=\"EIMS_C_50015_price\">￥" + t.OrderPriceOrig + "元</span>";
                    html += "                                      <span class=\"EIMS_C_50015_prolisp\"><i>X</i><i>" + t.OrderQuantity + "</i></span>";
                    html += "                                    </div>";
                    html += "                                </div>";
                    html += "                            </li>";

                });
                html += "                            <li class=\"EIMS_C_50015_proli5\"><span>合计</span>：<span class=\"EIMS_C_50015_price\">" + item.TotalMoney + "元</span></li>";
                html += EIMS_C_50015.OrderOperation(item.Status, item.Id);
                html += "                            <li class=\"EIMS_C_50015_proli6\"></li>";
                html += "                        </ul>";
                html += "                    </div>";
                html += "                </article>";


            });
            var oldHtml = $('#EIMS_C_50015_OrderDetail').html();
            $('#EIMS_C_50015_OrderDetail').html(oldHtml + html);
            return true;
        });

    },
    /*滚动下一页*/
    ScrollPage: function () {
        $(window).scroll(function () {
            //$(window).scrollTop()这个方法是当前滚动条滚动的距离
            //$(window).height()获取当前窗体的高度
            //$(document).height()获取当前文档的高度
            var bottom = 100; //bottom是底部距离的高度
            if ((bottom + $(window).scrollTop()) >= ($(document).height() - $(window).height())) {
                //当底部基本距离+滚动的高度〉=文档的高度-窗体的高度时；
                //异步加载数据
                var oldIndex = EIMS_C_50015.Config.PageIndex;
                EIMS_C_50015.Config.PageIndex += 1;
                if ((EIMS_C_50015.Config.PageIndex - oldIndex) == 1) {
                    EIMS_C_50015.LoadData(EIMS_C_50015.Config.DefaultStutus, 1);
                }
            }
        });
    },
    /*取消订单*/
    CancelOrder: function (id) {
        if (confirm("确认取消订单？")) {
            AjaxMethod("order", "CancelOrder", { Id: id }, function (data) {
                if (data.result == 1) {
                    $('#EIMS_C_50015_OrderId' + id).fadeOut("fast", function () {
                        $(this).remove();
                    });
                }
            });

        }
    },
    /*根据订单状态获取操作*/
    OrderOperation: function (status, orderId) {
        var html = "";
        switch (status) {
            case -2:
            case 2:
            case 3:
            case 5:
                html = "                            <li class='EIMS_C_50015_OrderOperation'>";
                html += "                                <input type=\"button\" class=\"EIMS_C_50015_orderDetail\" onclick='EIMS_C_50015.GoUrl(\"" + EIMS_C_50015.Config.ToOrderDetail + '?id=' + orderId + "\")' value=\"订单详情\" />";
                html += "                            </li>";
                break;
            case 4:
                html += "                            <li class='EIMS_C_50015_OrderOperation'>";
                html += "                                <input type=\"button\" class=\"EIMS_C_50015_orderDetail\" onclick='EIMS_C_50015.GoUrl(\"" + EIMS_C_50015.Config.ToOrderDetail + '?id=' + orderId + "\")' value=\"订单详情\" />";
                html += "                                <input type=\"button\" class=\"EIMS_C_50015_cancelOrder\" onclick='EIMS_C_50015.GoUrl(\"" + EIMS_C_50015.Config.ToCarriageUrl + '?id=' + orderId + "\")' value=\"物流查询\" />";
                html += "                                <input type=\"button\" class=\"EIMS_C_50015_goPay\" onclick='EIMS_C_50015.ConfirrmOrder(" + orderId + ")' value=\"确认订单\" />";
                html += "                            </li>";
                break;
            case 1:
                html += "                            <li class='EIMS_C_50015_OrderOperation'>";
                html += "                                <input type=\"button\" class=\"EIMS_C_50015_orderDetail\" onclick='EIMS_C_50015.GoUrl(\"" + EIMS_C_50015.Config.ToOrderDetail + '?id=' + orderId + "\")' value=\"订单详情\" />";
                html += "                                <input type=\"button\" class=\"EIMS_C_50015_cancelOrder\" onclick='EIMS_C_50015.CancelOrder(" + orderId + ")' value=\"取消订单\" />";
                html += "                                <input type=\"button\" class=\"EIMS_C_50015_goPay\" onclick='EIMS_C_50015.GoUrl(\"" + EIMS_C_50015.Config.ToOrderPayUrl + '?orderId=' + orderId + "\")' value=\"立即支付\" />";
                html += "                            </li>";
                break;
            default:
                html += "                            <li class='EIMS_C_50015_OrderOperation'>";
                html += "                                <input type=\"button\" class=\"EIMS_C_50015_orderDetail\" onclick='EIMS_C_50015.GoUrl(\"" + EIMS_C_50015.Config.ToOrderDetail + '?id=' + orderId + "\")'  value=\"订单详情\" />";
                html += "                                <input type=\"button\" class=\"EIMS_C_50015_cancelOrder\" onclick='EIMS_C_50015.CancelOrder(" + orderId + ")' value=\"取消订单\" />";
                html += "                                <input type=\"button\" class=\"EIMS_C_50015_goPay\" onclick='EIMS_C_50015.GoUrl(\"" + EIMS_C_50015.Config.ToOrderPayUrl + '?orderId=' + orderId + "\")' value=\"立即支付\" />";
                html += "                            </li>";
                break;
        }
        return html;
    },
    /*跳转地址*/
    GoUrl: function (url) {
        location.href = url;
    },
    /*确认订单*/
    ConfirrmOrder: function (id) {
        if (confirm("是否确认收货？")) {
            AjaxMethod("order", "ConfirmRevice", { Id: id }, function (data) {
                if (data.result == 1) {
                    location.href = location.href;
                }
            });

        }
    }

}
/* EIMS_C_50015 end */
/*end_xn_mc_orlist_1_wrap*/

/*xn_mc_orlistv_1_wrap*/
/* EIMS_C_50016 V1.0 Date:2015/05/01 begin */
$(function () {
    try {
        if($("#EIMS_C_50016_Panel").length > 0)
        {
            EIMS_C_50016.Init();
        };
    } catch (err) {
    }
});

var EIMS_C_50016 = {
    Config: {
        ToOrderPayUrl: "/m/spcstep3.aspx",
        ToCompanyUrl: "/m/logist_view.aspx"
    },
    Init: function () {
        $("#EIMS_C_50016_Pay,#EIMS_C_50016_Confirm").hide();

        //        $('#EIMS_C_50016_Panel img').error(function() {
        //            $(this).attr('src', "../images/img_loading.png");
        //        });

        //订单Id
        var param = { Id: QueryString("Id") };

        $("#EIMS_C_50016_Confirm").click(function () {
            EIMS_C_50016.ConfirmOrder(param.Id); //确认收货
        });


        AjaxMethod("Order", "GetCarriageCompAndOrderInfo", param, function (data) {
            if (IsNullOrEmpty(data)) {
                return;
            }

            if (data.result != 1) {
                return;
            }

            $('#EIMS_C_50016_name').html(data.msg.orderInfo.Receiver);
            $('#EIMS_C_50016_mobile').html(data.msg.orderInfo.Mobile);
            $('#EIMS_C_50016_address').html(data.msg.orderInfo.Address);
            $("#EIMS_C_50016_OrderStatus").html(data.msg.orderInfo.StatusName);

            //收货信息
            $("#EIMS_C_50016_address").html(data.msg.orderInfo.Address);
            $("#EIMS_C_50016_name").html(data.msg.orderInfo.Receiver);
            $("#EIMS_C_50016_mobile").html(data.msg.orderInfo.Mobile);
            $("#EIMS_C_50016_phone").html(data.msg.orderInfo.Telephone);
            $("#EIMS_C_50016_zip").html(data.msg.orderInfo.PostCode);
            $("#EIMS_C_50016_invoice").html(data.msg.orderInfo.InvoiceTitle);
            $("#EIMS_C_50016_remarks").html(data.msg.orderInfo.Description);

            //支付配送方式
            $("#EIMS_C_50016_payments").html(data.msg.orderInfo.PayType);
            $("#EIMS_C_50016_deliveryTime").html(data.msg.orderInfo.DeliveryTime);
            $("#EIMS_C_50016_company").html(data.msg.orderInfo.CarriageCompName);
            if (data.msg.orderInfo.CarriageNo != "") {
                $("#EIMS_C_50016_companyNO").html("单号:" + data.msg.orderInfo.CarriageNo);
                $("#EIMS_C_50016_companyurl").attr('href', EIMS_C_50016.Config.ToCompanyUrl + "?Id=" + QueryString("Id"));
            } else {
                $('#EIMS_C_50016_CompanySearch').remove();
            }

            //订单结算
            $("#EIMS_C_50016_money").html(data.msg.orderInfo.TotalMoney);
            $("#EIMS_C_50016_freightMoney").html(data.msg.orderInfo.CarriageCost);
            $("#EIMS_C_50016_lumpsumprc").html(data.msg.orderInfo.ActualTotalMoney); //应付总金额

            if (data.msg.orderInfo.CarriageCost == 0) {
                $("#EIMS_C_50016_freightMoney").html("0");
            }
            if (data.msg.orderInfo.ActualTotalMoney == 0) {
                $("#EIMS_C_50016_lumpsumprc").html("0");
            }

            if (data.msg.orderInfo.StatusName == "未付款") {
                $("#EIMS_C_50016_Pay").show();
                $("#EIMS_C_50016_Pay").click(function () {
                    location.href = EIMS_C_50016.Config.ToOrderPayUrl + "?orderId=" + QueryString("Id");
                });
            }
            else if (data.msg.orderInfo.StatusName == "待确认") {
                $("#EIMS_C_50016_Confirm").show();
            }
        });
    },
    /*确认订单*/
    ConfirmOrder: function (id) {
        if (confirm("是否确认收货？")) {
            AjaxMethod("order", "ConfirmRevice", { Id: id }, function (data) {
                if (data.result == 1) {
                    location.href = location.href;
                }
            });
        }
    }

}
/* EIMS_C_50016 end */
/*end_xn_mc_orlistv_1_wrap*/

/*xn_mc_logistv_1_wrap*/
/* EIMS_C_50026 V1.0 Date:2015/05/01 begin */
$(function () {
    try {
        if($("#EIMS_C_50026_Panel").length > 0)
        {
            EIMS_C_50026.Init();
        };
    } catch (err) {
    }
});

var EIMS_C_50026 = {
    Config: {
        ToOrderPayUrl: "/m/spcstep3.aspx"
    },
    Init: function () {
        //订单Id
        var param = { Id: QueryString("Id") };

        AjaxMethod("Order", "GetCarriageCompAndOrderInfo", param, function (data) {
            if (IsNullOrEmpty(data)) {
                return;
            }

            if (data.result != 1) {
                return;
            }


            $("#EIMS_C_50026_OrderStatus").html(data.msg.orderInfo.StatusName);
            $('#EIMS_C_50026_labOrderNO').html(data.msg.orderInfo.OrderNo);
            $('#EIMS_C_50026_labOrderTime').html(data.msg.orderInfo.DateTime);

            //物流明细
            $("#EIMS_C_50026_Contacter").html(data.msg.compay.Contacter);
            $("#EIMS_C_50026_CompanyUrl").html(data.msg.compay.CompanyUrl);
            $('#EIMS_C_50026_CompanyUrlHref').attr('href',data.msg.compay.CompanyUrl);


            $("#EIMS_C_50026_Telephone").html(data.msg.compay.Telephone);
            $("#EIMS_C_50026_Email").html(data.msg.compay.Email);
            $("#EIMS_C_50026_FoundUrl").html(data.msg.compay.FoundUrl);
            $('#EIMS_C_50026_FoundUrlHref').attr('href',data.msg.compay.FoundUrl);

            $("#EIMS_C_50026_company").html(data.msg.orderInfo.CarriageCompName);
            $("#EIMS_C_50026_companyNO").html(data.msg.orderInfo.CarriageNo);


        });
    }

}
/* EIMS_C_50026 end */
/*end_xn_mc_logistv_1_wrap*/

/*xn_mc_spcstep1_1_wrap*/
/*  EIMS_C_50010  2014/08/30 start  */
$(document).ready(function () {
    if ($("#EIMS_C_50010_Main").length > 0) {
        EIMS_C_50010.Init();
    }
});

var EIMS_C_50010_Config = {
    NormalProUrl: "/m/prod_view.aspx", //一般产品详情页
    PackageProUrl: "", //套餐产品详情页
    ProListUrl: "/m/index.aspx",       //继续购物跳转页面
    ToAccountUrl: "/m/spcstep2.aspx", //去结算跳转页面
    LoginUrl: "/m/login.aspx"             //未登录跳转页面
}   //购物车配置项

var EIMS_C_50010 = {
    Config: {
        LoginUrl: "/m/login.aspx",
        PackageCartIds: ",", //套餐购物详情id
        IsHaveSwapIntegral: 0, //购物车是否有兑换积分产品
        ReturnData: [],
        IsJudgeStock: 1    //是否判断库存
    },

    Init: function () {
        $.extend(EIMS_C_50010.Config, EIMS_C_50010_Config);
        AjaxMethod("ShoppingCart", "Get", "", function (data) {
            EIMS_C_50010.CallBack(data);
        });
        $("#EIMS_C_50010_BackLink").click(function () {
            window.location.href = EIMS_C_50010_Config.ProListUrl;
            //history.back();
        });
        $("#EIMS_C_50010_GoShopping").click(function () {
            window.location.href = EIMS_C_50010.Config.ProListUrl;
        });
    }, //初始化

    CallBack: function (data) {
        if (data.msg.length == 0) { //购物车为空
            $(".EIMS_C_50010_EmptyCart").css({ "display": "block" });
            return;
        }

        $(".EIMS_C_50010_EmptyCart").css({ "display": "none" });
        $(".EIMS_C_50010_Cart").css({ "display": "block" });

        EIMS_C_50010.Config.IsJudgeStock = data.result;
        EIMS_C_50010.Config.ReturnData = data.msg;

        var cartInfo = data.msg;
        var contents = "";

        for (var i = 0; i < cartInfo.length; i++) {
            contents += EIMS_C_50010.GetCartItemHtml(cartInfo[i]);
        }

        $(".EIMS_C_50010_CartDetails").html(contents);

        EIMS_C_50010.Balance(); //统计已选择购物详情信息

        EIMS_C_50010.BindEvent(); //调用方法，绑定事件
    }, //回调方法

    GetCartItemHtml: function (obj) {
        var contents = "\
                    <li bindid='" + obj.Id + "' quantity='" + obj.StockQuantity + "'>\
                        <div class='EIMS_C_50010_items'>\
                            <div class='EIMS_C_50010_check-wrapper'>\
                                <input type='checkbox' class='EIMS_C_50010_cart-checkbox' checked='checked'/>\
                            </div>\
                            <div class='EIMS_C_50010_shp-cart-item-core'>\
                                <a class='EIMS_C_50010_cart-product-cell-1' href='" + EIMS_C_50010.Config.NormalProUrl + "?id=" + obj.ProductId + "'>\
                                    <img class='EIMS_C_50010_cart-photo-thumb' src=\"" + obj.SmallImageUrl + "\" alt=\"\"/>\
                                </a>\
                                <div class='EIMS_C_50010_cart-product-cell-2'>\
                                    <div class='EIMS_C_50010_cart-product-name'>\
                                         <a href='" + EIMS_C_50010.Config.NormalProUrl + "?id=" + obj.ProductId + "'>\
                                         <span>" + obj.AliaName + "</span></a></div>\
                                <div class='shp-cart-opt'>\
                                     <div class='EIMS_C_50010_quantity-wrapper'>\
                                        <a class='EIMS_C_50010_quantity-decrease' bindtype='0'>-</a>\
                                        <input type='number' class='EIMS_C_50010_quantity' min='1' value = \"" + obj.Quantity + "\" />\
                                        <a class='EIMS_C_50010_quantity-increase' bindtype='1'>+</a>\
                                    </div>\
                                    <a class='EIMS_C_50010_shp-cart-icon-remove' bindtype='0'></a>\
                                </div>\
                            </div>\
                            <div class='EIMS_C_50010_cart-product-cell-3'>\
                                <div class='EIMS_C_50010_shp-cart-item-price'>￥" + obj.PriceVip + "\</div>\
                                <div class='EIMS_C_50010_shp-cart-item-buyprice'>￥" + obj.MarketPrice + "\</div>\
                            </div>\
                        </div>\
                    </div>\
                </li>";

        return contents;
    }, //构建一般购物车详情html标签

    Balance: function () {
        var selectedNum = 0, allMoney = 0.00;
        var selectedIds = ","; //已选择购物详情id

        selectedNum = $(".EIMS_C_50010_cart-checkbox:checked").length;
        var msg = EIMS_C_50010.Config.ReturnData;

        $(".EIMS_C_50010_cart-checkbox:checked").each(function () {
            var id = $(this).parents("li").attr("bindid");
            for (var i = 0; i < msg.length; i++) {
                if (id == msg[i].Id) {
                    allMoney += msg[i].ActualPrice;
                    break;
                }
            }
        });

        $("#EIMS_C_50010_TotalPrice").text(allMoney.toFixed(2)); //合计金额
        $("#EIMS_C_50010_checkedNum").text(selectedNum); //已选择商品多少件

    }, //统计已选择的购物详情信息

    BindEvent: function () {
        $(".EIMS_C_50010_cart-checkbox").on("click", function () {
            EIMS_C_50010.Balance();
        });

        $(".EIMS_C_50010_quantity").on("change", function () {
            EIMS_C_50010.InputBuyNum(this);
        }); //输入商品数量

        $(".EIMS_C_50010_quantity-decrease,.EIMS_C_50010_quantity-increase").on("click", function () {
            EIMS_C_50010.ChangeBuyNum(this);
        }); //增减商品数量

       /* $(".EIMS_C_50010_shp-cart-icon-remove,.EIMS_C_50010_ClearCart").on("click", function () {
            EIMS_C_50010.DelCartDetail("EIMS_C_50010_CartDetails);
        }); */
        $(".EIMS_C_50010_ClearCart").click(function(){
            $(alert(1));
        });
            //删除商品

        $(".EIMS_C_50010_Clearing").click(function () {
            AjaxMethod("User", "IsLogin", "", function (data) {
                EIMS_C_50010.ToAccountCallBack(data);
            });
        }); //结算

    }, //绑定事件

    InputBuyNum: function (obj) {
        var num = parseInt($(obj).val());
        if (isNaN(num) || num < 1) {
            num = 1;
        }

        if (EIMS_C_50010.Config.IsJudgeStock == 1) {
            var quantity = parseInt($(obj).parents("li").attr("quantity"));
            if (isNaN(quantity)) { return false; }

            if (num >= quantity) {
                alert("商品库存不够");
                num = quantity;
            }
        }

        var id = $(obj).parents("li").attr("bindid");

        AjaxMethod("ShoppingCart", "UpdateCartDetailNum", { "id": id, "quantity": num }, function (data) {
            EIMS_C_50010.UpdateProNumCallBack(id, data);
        });
    }, //输入商品数字

    ChangeBuyNum: function (obj) {
        var type = $(obj).attr("bindtype");
        var numObj = $(obj).parent().find(".EIMS_C_50010_quantity"); //原数量
        var oldNum = parseInt($(numObj).val());

        if (isNaN(oldNum)) { return; }

        if (type == "0") {  //减
            if (oldNum <= 1) {
                return;
            }
            oldNum--;
        } else if (type == "1") {   //加
            if (EIMS_C_50010.Config.IsJudgeStock == 1) {
                var quantity = parseInt($(obj).parents("li").attr("quantity"));
                if (isNaN(quantity)) { return; }
                if (oldNum >= quantity) {
                    alert("商品库存不够");
                    return;
                }
            }
            oldNum++;
        }

        var id = $(obj).parents("li").attr("bindid");

        AjaxMethod("ShoppingCart", "UpdateCartDetailNum", { "id": id, "quantity": oldNum }, function (data) {
            EIMS_C_50010.UpdateProNumCallBack(id, data);
        });
    }, //增减商品购买数量

    UpdateProNumCallBack: function (id, data) {
        var msg = data.msg;
        var oldData = EIMS_C_50010.Config.ReturnData; //原数据

        if (data.result == 0 || msg.length < 1) {//更新信息失败, 原易购数量不变
            var oldNum = 1; //原商品已购数量

            for (var i = 0; i < oldData.length; i++) {
                if (oldData[i].Id == id) {
                    oldNum = oldData[i].Quantity;
                    break;
                }
            }

            $("li[bindid='" + id + "']").find(".EIMS_C_50010_quantity").val(oldNum);
            alert(msg);
            return;
        }

        //商品数量更新成功
        var quantity = 1;
        var tempObj = $("li[bindid='" + id + "']");

        for (var i = 0; i < msg.length; i++) {

            //更新原数据
            if (msg[i].Id == id) {
                for (var j = 0; j < oldData.length; j++) {
                    if (oldData[j].Id == msg[i].Id) {
                        oldData[j] = msg[i];
                        quantity = msg[i].Quantity;
                        tempObj.find(".EIMS_C_50010_quantity").val(quantity);
                        break;
                    }
                }
            }
        }

        EIMS_C_50010.Balance(); //统计已选择购物详情信息
    }, //增减商品数量回调方法

    DelCartDetail: function (obj) {
        var type = $(obj).attr("bindtype");
        var ids = "";

        if (type == "0") {//删除单个购物详情
            if (!confirm("确认删除吗？")) {
                return false;
            }
            ids = $(obj).parents("li").attr("bindid")
        } else if ($(".EIMS_C_50010_cart-checkbox").length < 1) {//清空购物车
            alert("购物车已清空！");
            return false;
        }
        else if (!confirm("确认清空购物车吗")) {
            return false;
        }

        AjaxMethod("ShoppingCart", "Remove", { "ids": ids }, function (data) {
            EIMS_C_50010.DelCartCallBack(ids, type, data);
        });
    }, //删除购物车

    DelCartCallBack: function (id, type, data) {
        if (data.result == 0) {
            alert(data.msg);
            return false;
        }

        if (type == "0") {//删除单个商品
            $("li[bindid='" + id + "']").remove();
            if ($(".EIMS_C_50010_CartDetails li").length == 0) {
                $(".EIMS_C_50010_EmptyCart").css({ "display": "block" });
            }
        }
        else {
            $(".EIMS_C_50010_CartDetails").empty();
            $(".EIMS_C_50010_Cart").css({ "display": "none" });
            $(".EIMS_C_50010_EmptyCart").css({ "display": "block" });
        }

        EIMS_C_50010.Balance(); //统计已选择购物详情信息
    }, //删除购物车商品回调方法

    ToAccountCallBack: function (data) {
        if (data.result != 1) { //未登录
            document.location.href = MergeUrlParas(EIMS_C_50010.Config.LoginUrl, false, ["ReturnURL"], [document.location.href]);
            return;
        }

        var cartIds = "";
        $(".EIMS_C_50010_cart-checkbox:checked").each(function () {
            var id = $(this).parents("li").attr("bindid");
            if (!isNaN(parseInt(id)) && id > 0) {
                cartIds += $(this).parents("li").attr("bindid") + ",";
            }
        });

        cartIds = cartIds.substring(0, cartIds.length - 1);
        SaveCookie("selectedCartIds", cartIds);
        document.location.href = MergeUrlParas(EIMS_C_50010.Config.ToAccountUrl, false, [], []);
    } //去结算
}
/*  EIMS_C_50010 end  */
/*end_xn_mc_spcstep1_1_wrap*/

/*xn_mc_spcstep2_1_wrap*/
/*  EIMS_C_50011 start  */
$(function () {
    if ($("#EIMS_C_50011_Main").length > 0) {
        EIMS_C_50011.Init();
    }
});

var EIMS_C_50011 = {

    Config: {
        LoginUrl: "/m/login.aspx",
        CartStep1Page: "/m/spcstep1.aspx",
        CartStep3Page: "/m/spcstep3.aspx",
        ProductDetailPage: "#",    //商品详情跳转页
        DeliveryInfo: [], //收货地址信息
        ProvinceArray: [],  //省
        CityArray: [],      //市
        AreaArray: [],      //区
        SelecedDeliveryInfo: {
            DeliveryId: 0,  //已选收货地址id
            CountryId: 0,   //国家id
            ProvinceId: 0,  //省id
            CityId: 0,      //市id
            AreaId: 0,      //区id
            CompleteAddress: null    //完整收货地址
        },  //已选收货地址信息
        addressCPCA: {},    //已选收货地址
        CarriageCompanyId: 0,   //已选物流公司id
        CartInfo: [],   //购物车信息
        IsCanCOD: 0, //是否可货到付款
        OptionInfo: {
            IsOpenLimitCODMoney: 1, //是否开启货到付款金额限制
            LimitMoney: 500,    //货到付款金额限制金额
            FreeFreightOrderMoney: 0    //满多少免运费
        }, //配置信息
        Money: {
            ActualMoney: 0.00,  //实付总金额
            OrderMoney: 0.00,   //订单应付总金额
            ActualOrderMoney: 0.00, //订单实付总金额
            Freight: 0.00           //运费
        },
        CartDetailIds: ""       //购物车详情id集合
    },

    Init: function () {

        AjaxMethod("User", "IsLogin", "", function (data) {
            if (!data || data.result != 1) {
                document.location.href = MergeUrlParas(EIMS_C_50011.Config.LoginUrl, false, ["ReturnUrl"], [document.location.href]);
                return;
            }

            //加载购物车信息
            AjaxMethod("ShoppingCart", "GetCartAllInfo", "", function (data) {
                EIMS_C_50011.CartCallBack(data);
            });

            EIMS_C_50011.BindEvents();
        });

        $("#EIMS_C_50011_GoBack").on("click", function () {
            window.location.href = MergeUrlParas(EIMS_C_50011.Config.CartStep1Page, true, [], []);
            //history.back();
        });

    }, //初始化

    CartCallBack: function (data) {
        if (data.CartInfo.length == 0) {
            return false; //购物车为空
        }

        var cartIds = GetCookie("selectedCartIds"); //购物车第一步选中的商品id

        if (!IsNullOrEmpty(cartIds)) {
            cartIds = "," + cartIds + ",";
            for (var i = 0; i < data.CartInfo.length; i++) {
                if (cartIds.indexOf("," + data.CartInfo[i].Id + ",") >= 0) {
                    EIMS_C_50011.Config.CartInfo[EIMS_C_50011.Config.CartInfo.length] = data.CartInfo[i];
                }
            }
        }
        else {
            EIMS_C_50011.Config.CartInfo = data.CartInfo;
        }

        var orderMoney = 0, actualOrderMoney = 0;

        for (var i = 0; i < EIMS_C_50011.Config.CartInfo.length; i++) {
            actualOrderMoney += EIMS_C_50011.Config.CartInfo[i].ActualPrice;
            orderMoney += EIMS_C_50011.Config.CartInfo[i].PriceOrig * EIMS_C_50011.Config.CartInfo[i].Quantity;

            if (i > 0) {
                EIMS_C_50011.Config.CartDetailIds += ",";
            }
            EIMS_C_50011.Config.CartDetailIds += EIMS_C_50011.Config.CartInfo[i].Id;
        }

        EIMS_C_50011.Config.Money.OrderMoney = orderMoney; //订单应付总金额
        EIMS_C_50011.Config.Money.ActualOrderMoney = actualOrderMoney; //订单实付总金额
        EIMS_C_50011.Config.Money.ActualMoney = actualOrderMoney;   //应付总金额
        EIMS_C_50011.Config.OptionInfo = data.OptionInfo; //配置信息

        EIMS_C_50011.DeliveryBind(data.DeliveryInfo);  //收货人地址
        EIMS_C_50011.DeliveryTimeSelect();  //收货时间选择项
        EIMS_C_50011.CarriageInit(data.CarriageInfo, data.CompanyInfo); //物流方式加载
        EIMS_C_50011.InvoiceInit(); //发票信息加载
        EIMS_C_50011.GoodsListInit(); //商品列表
        EIMS_C_50011.ShowTotalMoney(); //计算金额

        EIMS_C_50011.RefreshDeliveryList();
        EIMS_C_50011.GoodsListHtml();

        //提交订单
        $("#EIMS_C_50011_Submit").on("click", function () {
            $(this).off('click');
            EIMS_C_50011.SubmitOrder();
        });

    }, //购物车信息

    DeliveryBind: function (data) {

        try {
            if (nations) {
                EIMS_C_50011.DeliveryCPCABind(); //获取省市区信息
            }
        }
        catch (err) {
            $.ajaxSetup({ cache: true, async: false });

            $.getScript("/Js/ChinaArea.js").done(function () {
                EIMS_C_50011.DeliveryCPCABind(); //获取省市区信息
            }).fail(function () {

            });
        }

        //确认事件
        $("#EIMS_C_50011_Add_Confirm").on("click", function () {
            EIMS_C_50011.DeliveryInfoSubmit();
        });

        $(".EIMS_C_50011_D_Address").on("click", function () {
            if (data.length > 0) {
                //EIMS_C_50011.RefreshDeliveryList();    //展示收货地址列表
                Mobilebone.transition($("#EIMS_C_50011_D_A_ListMask")[0], $("#EIMS_C_50011_PageMain")[0]);
            } else {
                EIMS_C_50011.DeliveryAdd();    //展示收货地址列表
                Mobilebone.transition($("#EIMS_C_50011_D_A_AddMask")[0], $("#EIMS_C_50011_PageMain")[0]);
            }
        });

        EIMS_C_50011.Config.DeliveryInfo = data;
        EIMS_C_50011.DeliveryLoadDefault();    //加载收货地址默认信息

    }, //显示默认收货地址

    DeliveryLoadDefault: function () {
        var msg = EIMS_C_50011.Config.DeliveryInfo;
        if (msg.length == 0) {
            return;
        }

        var defaultData = null;

        //先判断是否有默认地址
        for (var i = 0; i < msg.length; i++) {
            if (msg[i].IsDefault == "1") {
                defaultData = msg[i];
                break;
            }
        }

        if (defaultData == null) {  //没有默认地址，则取第一个地址
            defaultData = msg[0];
        }
        var p = "", c = "", a = "";

        //获取默认收货地址省市区名称
        var ps = EIMS_C_50011.Config.ProvinceArray;
        var cs = EIMS_C_50011.Config.CityArray;
        var as = EIMS_C_50011.Config.AreaArray;

        for (var j = 0; j < ps.length; j++) {
            if (defaultData.ProvinceId == ps[j][0]) {
                p = ps[j][1];

                for (var k = 0; k < cs.length; k++) {
                    if (defaultData.CityId == cs[k][1]) {
                        c = cs[k][2];

                        for (var m = 0; m < as.length; m++) {
                            if (defaultData.AreaId == as[m][2]) {
                                a = as[m][3];
                                break;
                            }
                        }
                        break;
                    }
                }
                break;
            }
        }

        $(".EIMS_C_50011_D_Address div").eq(0).html("<i>"+defaultData.Contacter+"</i><i>"+defaultData.Mobile+"</i>");
        $(".EIMS_C_50011_D_Address div").eq(1).html(p + "-" + c + "-" + a + defaultData.Address);

        EIMS_C_50011.Config.SelecedDeliveryInfo.DeliveryId = defaultData.Id;
        EIMS_C_50011.Config.SelecedDeliveryInfo.CountryId = defaultData.CountryId;
        EIMS_C_50011.Config.SelecedDeliveryInfo.ProvinceId = defaultData.ProvinceId;
        EIMS_C_50011.Config.SelecedDeliveryInfo.CityId = defaultData.CityId;
        EIMS_C_50011.Config.SelecedDeliveryInfo.AreaId = defaultData.AreaId;
        EIMS_C_50011.Config.SelecedDeliveryInfo.CompleteAddress = p + c + a + defaultData.Address;

    }, //加载收货地址默认信息

    DeliveryCPCABind: function () {
        //省市区暂时只考虑国内
        if (IsNullOrEmpty(nations)) {
            return;
        }
        var pros = nations[0].provinces; //获取国内省市区信息

        $(pros).each(function (i, p) {//省
            var pArray = [p.pId, p.pn, p.p_en]; //省信息
            EIMS_C_50011.Config.ProvinceArray[EIMS_C_50011.Config.ProvinceArray.length] = pArray;

            $(p.cities).each(function (j, c) {//市
                var cArray = [p.pId, c.cId, c.cn, c.c_en]; //市信息
                EIMS_C_50011.Config.CityArray[EIMS_C_50011.Config.CityArray.length] = cArray;

                $(c.areas).each(function (k, a) {//区
                    var aArray = [p.pId, c.cId, a.aId, a.an, a.a_en];
                    EIMS_C_50011.Config.AreaArray[EIMS_C_50011.Config.AreaArray.length] = aArray;
                });
            });
        });

    }, //保存省、市、区信息

    BindEvents: function () {

        $(".EIMS_C_50011_D_AddAddress").on("click", function () {//新增收货地址
            EIMS_C_50011.DeliveryAdd();
            Mobilebone.transition($("#EIMS_C_50011_D_A_AddMask")[0], $("#EIMS_C_50011_D_A_ListMask")[0]);
        });

        //点击省市区文本框弹出选项
        $(".EIMS_C_50011_Address").on("click", function () {
            var wrapper = $(this).parents(".EIMS_C_50011_D_AddDetail");
            var placelist = wrapper.find(".EIMS_C_50011_AddressList");
            placelist.html("");
            EIMS_C_50011.GetProvinces(placelist);
            EIMS_C_50011.SetDivHeight(wrapper);
            wrapper.children(".EIMS_C_50011_AddressDiv").slideDown();
        });

        //关闭省市区弹出
        $(".EIMS_C_50011_Close").on("click", function () {
            $(".EIMS_C_50011_AddressDiv").slideUp();
        });
    },

    SetDivHeight: function (wrapper) {
        var addressP = wrapper.find(".EIMS_C_50011_AddressP").next();
        var limitHeight = $(window).height() - addressP.offset().top;
        var addressDiv = wrapper.find(".EIMS_C_50011_AddressDiv");
        addressDiv.height(limitHeight);

        var innerHeight = limitHeight - 44;
        var innerDiv = wrapper.find(".EIMS_C_50011_AddressList");
        innerDiv.height(innerHeight);
    },

    GetProvinces: function (placelist) {

        var provinces = EIMS_C_50011.Config.ProvinceArray;
        placelist.html("");
        $.each(provinces, function (i) {
            placelist.append("<p bindid=" + provinces[i][0] + ">" + provinces[i][1] + "</p>");
        });
        var addressInput = placelist.parent().siblings(".EIMS_C_50011_AddressP").children();

        placelist.children("p").on("click", function () {
            var provinceId = $(this).attr("bindid");
            EIMS_C_50011.Config.addressCPCA.pid = provinceId;
            addressInput.val($(this).text());
            EIMS_C_50011.GetCities(provinceId, placelist);
        });
    }, //加载城省数据

    GetCities: function (provinceId, placelist) {

        var cities = EIMS_C_50011.Config.CityArray;
        placelist.html("");
        $.each(cities, function (i) {
            if (cities[i][0] == provinceId) {
                placelist.append("<p bindid=" + cities[i][1] + ">" + cities[i][2] + "</p>");
            }
        });
        var addressInput = placelist.parent().siblings(".EIMS_C_50011_AddressP").children(".EIMS_C_50011_Address");
        placelist.children("p").on("click", function () {
            var cityId = $(this).attr("bindid");
            EIMS_C_50011.Config.addressCPCA.cid = cityId;
            addressInput.val(addressInput.val() + $(this).text());
            EIMS_C_50011.GetAreas(cityId, placelist);
        });
    }, //加载城市数据

    GetAreas: function (cityId, placelist) {
        placelist.html("");
        var areas = EIMS_C_50011.Config.AreaArray;

        $.each(areas, function (i) {
            if (areas[i][1] == cityId) {
                placelist.append("<p bindid=" + areas[i][2] + ">" + areas[i][3] + "</p>");
            }
        });

        var addressInput = placelist.parent().siblings(".EIMS_C_50011_AddressP").children(".EIMS_C_50011_Address");
        placelist.children("p").on("click", function () {
            var areaId = $(this).attr("bindid");
            EIMS_C_50011.Config.addressCPCA.aid = areaId;
            placelist.parent().slideUp();
            addressInput.val(addressInput.val() + $(this).text());
        });

    }, //加载区域数据

    RefreshDeliveryList: function () {
        var msg = EIMS_C_50011.Config.DeliveryInfo;

        if (msg.length < 1) {
            return;
        }

        var ps = EIMS_C_50011.Config.ProvinceArray;
        var cs = EIMS_C_50011.Config.CityArray;
        var as = EIMS_C_50011.Config.AreaArray;
        var s = "";

        for (var i = 0; i < msg.length; i++) {
            var p = "", c = "", a = "";

            //获取当前收货地址省市区名称
            for (var j = 0; j < ps.length; j++) {
                if (msg[i].ProvinceId == ps[j][0]) {
                    p = ps[j][1];

                    for (var k = 0; k < cs.length; k++) {
                        if (msg[i].CityId == cs[k][1]) {
                            c = cs[k][2];

                            for (var m = 0; m < as.length; m++) {
                                if (msg[i].AreaId == as[m][2]) {
                                    a = as[m][3];
                                    break;
                                }
                            }
                            break;
                        }
                    }
                    break;
                }
            }

            s += "<div class=\"EIMS_C_50011_D_A_Single\" bindid=\"" + msg[i].Id + "\" bindtype=\"" + msg[i].IsDefault + "\"> \
                    <div class=\"EIMS_C_50011_D_A_SingleItem\"> \
                        <span><i>" + msg[i].Contacter + "</i><i>" + msg[i].Mobile + "</i></span>\
                        <span class=EIMS_C_50011_InnerAddress data-original=" + p + c + a + ">" + p + "-" + c + "-" + a + msg[i].Address + "</span> \
                    </div> \
                    <div class=\"EIMS_C_50011_D_A_SingleEdit\"> \
                        <a href=\"javascript:\" bindtype='0'><img src=\"http://1.rc.xiniu.com/rc/Mobiles/19040/images/Controls/cartRead.png\"/></a> \
                        <a href=\"javascript:\" bindtype='1'><img src=\"http://1.rc.xiniu.com/rc/Mobiles/19040/images/Controls/cartDelete.png\"/></a> \
                    </div> \
                  </div>";
        }

        $(".EIMS_C_50011_D_A_List").html(s);

        //设置默认地址div添加类名
        var defaultAddr = $(".EIMS_C_50011_D_A_Single[bindtype=1]");
        if (defaultAddr.length > 0) {
            $(".EIMS_C_50011_D_A_Single[bindtype=1]").addClass("EIMS_C_50011_D_A_Default");
        } else {
            $(".EIMS_C_50011_D_A_Single:first").addClass("EIMS_C_50011_D_A_Default");
        }

        $(".EIMS_C_50011_D_A_SingleItem").on("click", function () {
            EIMS_C_50011.SetDeliveryAddress(this);
            $(this).parent().addClass("EIMS_C_50011_D_A_Default").siblings().removeClass("EIMS_C_50011_D_A_Default");
            Mobilebone.transition($("#EIMS_C_50011_PageMain")[0], $("#EIMS_C_50011_D_A_ListMask")[0], true);
            if (EIMS_C_50011.Config.DeliveryInfo.length > 1) {
                EIMS_C_50011.SetDefaultAddress($(this).parent().attr("bindid"));
            }
        });

        //绑定修改和删除事件
        $(".EIMS_C_50011_D_A_Single a").on("click", function () {
            var type = $(this).attr("bindtype");
            if (type == "0") {  //修改
                EIMS_C_50011.DeliveryAdd(this);
                Mobilebone.transition($("#EIMS_C_50011_D_A_AddMask")[0], $("#EIMS_C_50011_D_A_ListMask")[0]);
            }
            else if (type == "1") { //删除
                EIMS_C_50011.DeliveryDel(this);
            }
        });
    }, //收货地址列表html组合

    SetDeliveryAddress: function (obj) {
        var addressId = $(obj).parent().attr("bindid");
        var msg = EIMS_C_50011.Config.DeliveryInfo;
        if (msg.length == 0) {
            return;
        }

        var selectedData = null;

        //先判断是否有默认地址
        for (var i = 0; i < msg.length; i++) {
            if (msg[i].Id == addressId) {
                selectedData = msg[i];
                break;
            }
        }

        $(".EIMS_C_50011_D_Address div").eq(0).html($(obj).find("span:first").html());
        var completeAddress = $(obj).find("span:last").text();
        $(".EIMS_C_50011_D_Address div").eq(1).html(completeAddress);

        EIMS_C_50011.Config.SelecedDeliveryInfo.DeliveryId = selectedData.Id;
        EIMS_C_50011.Config.SelecedDeliveryInfo.CountryId = selectedData.CountryId;
        EIMS_C_50011.Config.SelecedDeliveryInfo.ProvinceId = selectedData.ProvinceId;
        EIMS_C_50011.Config.SelecedDeliveryInfo.CityId = selectedData.CityId;
        EIMS_C_50011.Config.SelecedDeliveryInfo.AreaId = selectedData.AreaId;
        EIMS_C_50011.Config.SelecedDeliveryInfo.CompleteAddress = completeAddress.replace(/-/gm, '');
    },

    SetDefaultAddress: function (addressId) {
        if (addressId <= 0) return;
        AjaxMethod("DeliveryAddress", "SetDefault", { "id": addressId }, function (data) {
            if (!data || data.result != 1) return;

            var msg = EIMS_C_50011.Config.DeliveryInfo;    //修改完数据库后修改js中的地址变量
            if (msg.length <= 1) {
                return;
            }
            msg[0].IsDefault = "0";    //清除旧默认地址
            for (var i = 0; i < msg.length; i++) {    //设置新默认地址
                if (msg[i].Id == addressId) {
                    msg[i].IsDefault = "1";
                    var modifiedAddress = msg[i];
                    msg.splice(i, 1);
                    msg.unshift(modifiedAddress);
                    break;
                }
            }
        });
    },

    DeliveryAdd: function (obj) {
        var id = -1;
        if (obj != null) {  //修改
            $("#EIMS_C_50011_D_A_AddMain .EIMS_C_50011_TitleTipDiv").text("修改收货地址");
            id = $(obj).parent().parent().attr("bindid");
            var data = null;
            var msg = EIMS_C_50011.Config.DeliveryInfo;
            for (var i = 0; i < msg.length; i++) {
                if (msg[i].Id == id) {
                    data = msg[i];
                    break;
                }
            }

            $("#EIMS_C_50011_Add_Contacter").val(data.Contacter);
            $("#EIMS_C_50011_Add_Mobile").val(data.Mobile);

            var innerAddr = $(obj).parents(".EIMS_C_50011_D_A_Single").find(".EIMS_C_50011_InnerAddress").attr("data-original");
            $("#EIMS_C_50011_Address").val(innerAddr);
            $("#EIMS_C_50011_Add_Address").val(data.Address);
            $("#EIMS_C_50011_Add_Zip").val(data.PostCode);
            $("#EIMS_C_50011_Add_Confirm").attr({ "bindid": id });
            EIMS_C_50011.Config.addressCPCA = { nid: msg[i].CountryId, pid: msg[i].ProvinceId, cid: msg[i].CityId, aid: msg[i].AreaId };
        }
        else {  //新增
            $("#EIMS_C_50011_Add_Contacter").val("");
            $("#EIMS_C_50011_Add_Mobile").val("");
            $("#EIMS_C_50011_Address").val("");
            $("#EIMS_C_50011_Add_Address").val("");
            $("#EIMS_C_50011_Add_Zip").val("");
            $("#EIMS_C_50011_Add_Confirm").removeAttr("bindid");
            EIMS_C_50011.Config.addressCPCA = {};
        }
    }, //添加或修改收货地址

    DeliveryInfoSubmit: function () {
        var isCheckSuccess = EIMS_C_50011.DeliverySubmitCheck();
        if (!isCheckSuccess) {
            return false;
        }

        var id = $("#EIMS_C_50011_Add_Confirm").attr("bindid");
        if (IsNullOrEmpty(id)) {
            id = -1;
        }

        var keyValues = { id: id,
            nid: 1, //国家：中国
            contacter: $("#EIMS_C_50011_Add_Contacter").val(),
            pid: EIMS_C_50011.Config.addressCPCA.pid,  //省、直辖市
            cid: EIMS_C_50011.Config.addressCPCA.cid,  //市区
            aid: EIMS_C_50011.Config.addressCPCA.aid,  //区县
            address: $("#EIMS_C_50011_Add_Address").val(),
            mobile: $("#EIMS_C_50011_Add_Mobile").val(),
            zip: $("#EIMS_C_50011_Add_Zip").val()
        };

        var methodName = id > 0 ? "Update" : "Add";
        var tipName = id > 0 ? "更新" : "新增";

        $("#EIMS_C_50011_Add_Confirm").addClass("EIMS_C_50011_Inactive");    //禁用提交按钮，防止重复提交

        AjaxMethod("DeliveryAddress", methodName, keyValues, function (data) {
            if (data.result == 0) {
                alert(tipName + "失败，原因：" + data.msg);
                return;
            }

            EIMS_C_50011.Config.DeliveryInfo = data.msg;

            if (id < 1 && data.msg.length == 1) {   //表示新增的第一条数据
                EIMS_C_50011.DeliveryLoadDefault(); //加载收货地址默认信息
            }

            //从新加载列表信息
            EIMS_C_50011.RefreshDeliveryList();

            $("#EIMS_C_50011_Add_Confirm").removeClass("EIMS_C_50011_Inactive");

            //更新或新增成功后，返回列表页
            Mobilebone.transition($("#EIMS_C_50011_D_A_ListMask")[0], $("#EIMS_C_50011_D_A_AddMask")[0], true);
        });
    }, //提交新增或修改收货地址信息

    DeliverySubmitCheck: function () {
        //收货人
        var val = $("#EIMS_C_50011_Add_Contacter").val().trim();
        if (val.length < 1) {
            $("#EIMS_C_50011_Add_Contacter").focus();
            return false;
        }

        //手机号码
        val = $("#EIMS_C_50011_Add_Mobile").val().trim();
        if (val.length < 1) {
            $("#EIMS_C_50011_Add_Mobile").focus();
            return false;
        }
        reg = /^1[3-8][0-9]{9}$/;
        if (!reg.test(val)) {
            alert("手机号码格式不正确，请重新输入！");
            $("#EIMS_C_50011_Add_Mobile").focus();
            return false;
        }

        //省市区
        if (!$("#EIMS_C_50011_Address").val()) {
            $("#EIMS_C_50011_Address").focus();
            return false;
        }

        //详细地址
        val = $("#EIMS_C_50011_Add_Address").val().trim();
        if (val.length < 1) {
            alert("详细地址不能为空");
            $("#EIMS_C_50011_Add_Address").focus();
            return false;
        }

        //邮编
        val = $("#EIMS_C_50011_Add_Zip").val().trim();
        var reg = /^[0-9]{6}$/;
        if (val.length > 0 && !reg.test(val)) {
            alert("邮政编码格式不正确");
            $("#EIMS_C_50011_Add_Zip").focus();
            return false;
        }

        return true;
    }, //添加或修改收货地址提交验证

    DeliveryDel: function (obj) {
        if (!confirm("确认删除该收货地址吗？")) {
            return false;
        }

        var single = $(obj).parent().parent();
        var id = single.attr("bindid");
        AjaxMethod("DeliveryAddress", "Delete", { "id": id }, function (data) {
            if (data.result == 0) {
                alert("删除失败，原因：" + data.msg);
                return;
            }

            single.remove(); //删除标签

            var msg = EIMS_C_50011.Config.DeliveryInfo;
            for (var i = 0; i < msg.length; i++) {
                if (msg[i].Id == id) {
                    msg.splice(i, 1);
                    break;
                }
            }

            if (msg.length == 0) {  //表示已经删完了
                $(".EIMS_C_50011_D_Address .EIMS_C_50011_D_A_LiL").find("div").eq(0).text("还没设置收货地址");
                $(".EIMS_C_50011_D_Address .EIMS_C_50011_D_A_LiL").find("div").eq(1).text("去添加一个收货地址");
            }
        });
    }, //删除收货地址

    DeliveryTimeSelect: function () {
        $(".EIMS_C_50011_D_TimeShowDiv").on("click", function () {
            Mobilebone.transition($("#EIMS_C_50011_D_TimeTask")[0], $("#EIMS_C_50011_PageMain")[0]);
        });
        $(".EIMS_C_50011_D_T_Single img[check=1]").parent().addClass("EIMS_C_50011_D_T_Single_curr");
        $(".EIMS_C_50011_D_T_Single").on("click", function () {
            //追加20151104
            $(".EIMS_C_50011_D_T_Single img").attr({ "src": "http://1.rc.xiniu.com/rc/Mobiles/19040/images/Controls/cartNormal.png", "check": "0" });
            $(this).find("img").attr({ "src": "http://1.rc.xiniu.com/rc/Mobiles/19040/images/Controls/cartSelected.png", "check": "1" });
            $(".EIMS_C_50011_D_TimeSelected").text($(this).find("span").text());
            Mobilebone.transition($("#EIMS_C_50011_PageMain")[0], $("#EIMS_C_50011_D_TimeTask")[0], true);
            //追加20151104
            $(this).addClass("EIMS_C_50011_D_T_Single_curr").siblings().removeClass("EIMS_C_50011_D_T_Single_curr");
        });
    },    //选择收货时间事件

    CarriageInit: function (carriages, companys) {
        if (carriages.length == 0) {
            return; //无物流方式
        }

        //获取默认物流公司
        var carriageId = carriages[0].Id; //默认物流方式id， 没有则取第一个物流方式
        var companyId = -1;                 //默认物流公司id
        var companyName = "";           //默认物流公司名称
        var index = -1;

        for (var i = 0; i < carriages.length; i++) {
            if (carriages[i].IsDefault == 1) {
                carriageId = carriages[i].Id;
                break;
            }
        }

        for (var i = 0; i < companys.length; i++) {
            if (companys[i].CarriageWayId == carriageId) {
                index = i;
                if (index > -1) {
                    companyName = companys[i].Name;
                    companyId = companys[i].Id;
                    index = -1;
                }

                if (companys[i].IsDefault == 1) {
                    companyName = companys[i].Name;
                    companyId = companys[i].Id;
                    break;
                }
            }
        }

        $(".EIMS_C_50011_D_CarriageSelected").text(companyName);
        EIMS_C_50011.Config.CarriageCompanyId = companyId; //默认物流公司id

        //加载物流方式列表
        if ($(".EIMS_C_50011_CarriageSingle").length < 1) {
            EIMS_C_50011.CarriageListShow(carriages, companys, companyId);
        }

        //弹出物流方式列表页
        $("#EIMS_C_50011_Carriage").on("click", function () {
            Mobilebone.transition($("#EIMS_C_50011_CarriageTask")[0], $("#EIMS_C_50011_PageMain")[0]);
        });

        if (EIMS_C_50011.Config.OptionInfo.FreeFreightOrderMoney < 1 ||
            EIMS_C_50011.Config.OptionInfo.FreeFreightOrderMoney >= EIMS_C_50011.Config.Money.ActualOrderMoney) {
            //根据默认物流公司获取运费和是否支持货到付款
            EIMS_C_50011.CarriageFreight();
        }
    }, //物流方式加载
    CarriageFreight: function () {

        var msg = EIMS_C_50011.Config.SelecedDeliveryInfo;
        var companyId = EIMS_C_50011.Config.CarriageCompanyId;

        if (companyId < 1 || msg.CountryId < 1 || msg.ProvinceId < 1) {
            return;
        }

        var info = { CompanyId: companyId,
            CountryId: msg.CountryId,
            ProvinceId: msg.ProvinceId,
            CityId: msg.CityId,
            AreaId: msg.AreaId
        };

        AjaxMethod("ShoppingCart", "GetFreight", info, function (data) {
            var tempFreight = 0;
            var tempIsCOD = 0;

            if (data.result == 0) {
                EIMS_C_50011.Config.CarriageCompanyId = 0;
                $(".EIMS_C_50011_D_CarriageSelected").text("");
                $(".EIMS_C_50011_C_Company li img[check=1]").attr({ "src": "http://1.rc.xiniu.com/rc/Mobiles/19040/images/Controls/cartNormal.png", "check": "0" });
                alert(data.msg);
            }
            else {
                tempFreight = data.msg.Freight;
                tempIsCOD = data.msg.IsCOD;
            }

            EIMS_C_50011.Config.Money.Freight = tempFreight; //运费
            EIMS_C_50011.Config.IsCanCOD = tempIsCOD; //是否支持货到付款

            EIMS_C_50011.ShowTotalMoney(); //重新计算总金额
        });
    }, //获取物流运费和是否支持货到付款

    CarriageListShow: function (Carriage, Company, companyId) {
        var carriageId = -1;
        var html = "";

        for (var i = 0; i < Carriage.length; i++) {
            html += "<div class=\"EIMS_C_50011_CarriageSingle\" bindid=\"" + Carriage[i].Id + "\"> \
                        <div class=\"EIMS_C_50011_C_S_Title\">" + Carriage[i].Name + "</div> \
                        <ul class=\"EIMS_C_50011_C_Company\">";

            for (var j = 0; j < Company.length; j++) {

                if (Carriage[i].Id != Company[j].CarriageWayId) {
                    continue;
                }

                var check = "0";
                var imgName = "cartNormal.png";
                //追加20151104
                var addclassName = "EIMS_C_50011_C_Company_li";
                if (Company[j].Id == companyId) {
                    carriageId = Company[j].CarriageWayId;
                    check = "1";
                    imgName = "cartSelected.png";
                    addclassName = "EIMS_C_50011_C_Company_licurr";
                }

                html += "<li bindid=\"" + Company[j].Id + "\" class=\"" + addclassName + "\" > \
                            <span>" + Company[j].Name + "</span> \
                            <img src=\"http://1.rc.xiniu.com/rc/Mobiles/19040/Images/Controls/" + imgName + "\" check=\"" + check + "\"/> \
                        </li>";
            } //in for end
            html += "</ul></div>";
        }

        $("#EIMS_C_50011_CarriageList").html(html);
        $(".EIMS_C_50011_C_Company img[check=1]").parent().parent().css({ "display": "block" });

        //绑定物流方式单击事件
        $(".EIMS_C_50011_CarriageSingle").on("click", function () {
            $(".EIMS_C_50011_C_Company").css({ "display": "none" });
            $(this).find(".EIMS_C_50011_C_Company").css({ "display": "block" });
        });

        //绑定物流公司单击事件
        $(".EIMS_C_50011_C_Company li").on("click", function () {
            $(".EIMS_C_50011_C_Company li img").attr({ "src": "http://1.rc.xiniu.com/rc/Mobiles/19040/images/Controls/cartNormal.png", "check": "0" });
            $(this).find("img").attr({ "src": "http://1.rc.xiniu.com/rc/Mobiles/19040/images/Controls/cartSelected.png", "check": "1" });

            var companyId = $(this).attr("bindid");
            for (var i = 0; i < Company.length; i++) {
                if (companyId == Company[i].Id) {
                    $(".EIMS_C_50011_D_CarriageSelected").text(Company[i].Name);
                    EIMS_C_50011.Config.CarriageCompanyId = companyId; //默认物流公司id
                    break;
                }
            }

            if (EIMS_C_50011.Config.OptionInfo.FreeFreightOrderMoney < 1 ||
                EIMS_C_50011.Config.OptionInfo.FreeFreightOrderMoney >= EIMS_C_50011.Config.Money.ActualOrderMoney) {
                //根据默认物流公司获取运费和是否支持货到付款
                EIMS_C_50011.CarriageFreight();
            }

            Mobilebone.transition($("#EIMS_C_50011_PageMain")[0], $("#EIMS_C_50011_CarriageTask")[0], true);
        });
    }, //加载物流公司列表数据

    ShowTotalMoney: function () {
        var cartNum = EIMS_C_50011.Config.CartInfo.length; //已购买商品件数
        $("#EIMS_C_50011_ProNum").text(cartNum);
        $("#EIMSC_C_50011_OrderMoney").text((EIMS_C_50011.Config.Money.OrderMoney).toFixed(2)); //订单总金额
        $("#EIMS_C_50011_Freight").text((EIMS_C_50011.Config.Money.Freight).toFixed(2)); //运费

        EIMS_C_50011.Config.Money.ActualMoney = EIMS_C_50011.Config.Money.ActualOrderMoney + EIMS_C_50011.Config.Money.Freight; //实付总金额
        $("#EIMS_C_50011_TotalMoney").text((EIMS_C_50011.Config.Money.ActualMoney).toFixed(2));
    }, //计算总金额

    InvoiceInit: function () {
        $("#EIMS_C_50011_InvoiceTitle").val("个人发票");

        $("#EIMS_C_50011_InvoiceDiv").on("click", function () {
            Mobilebone.transition($("#EIMS_C_50011_InvoiceTask")[0], $("#EIMS_C_50011_PageMain")[0]);
        });

        $("#EIMS_C_50011_InvoiceOk").on("click", function () {
            $("#EIMS_C_50011_InvoiceSelected").text($("#EIMS_C_50011_InvoiceTitle").val());
        });

    }, //发票加载

    GoodsListInit: function () {
        $("#EIMS_C_50011_GoodsDiv").on("click", function () {
            Mobilebone.transition($("#EIMS_C_50011_GoodsTask")[0], $("#EIMS_C_50011_PageMain")[0]);
        });
    }, //商品列表初始化

    GoodsListHtml: function () {
        var msg = EIMS_C_50011.Config.CartInfo;

        if (msg.length < 1) {
            return;
        }
        var html = "", params = "";

        for (var i = 0; i < msg.length; i++) {
            params = "";
            if (msg[i].Params.length > 0) {
                params = "刻字：" + msg[i].Params;
            }

            html += "<ul class=\"EIMS_C_50011_Normal\"> \
                        <li class=\"EIMS_C_50011_Col_1\"> \
                            <img src=\"" + msg[i].SmallImageUrl + "\" />\
                        </li> \
                        <li class=\"EIMS_C_50011_Col_2\"> \
                            <div><span>" + msg[i].AliaName + "</span></div>\
                            <div>" + params + "</div>\
                            <div> \
                                <span class=\"EIMS_C_50011_PriceYuan\"> \
                                    <span class=\"EIMS_C_50011_PriceSpan\">" + msg[i].PriceVip.toFixed(2) + "</span>元 \
                                </span> \
                                <span>数量：" + msg[i].Quantity + "</span>\
                            </div>\
                        </li> \
                       </ul>";
        }

        $(".EIMS_C_50011_GoodsList").html(html);
    }, //商品列表html

    /* 提交订单 */
    SubmitOrder: function () {
        var deliveryId = EIMS_C_50011.Config.SelecedDeliveryInfo.DeliveryId; //收货地址信息
        var deliveryTime = $(".EIMS_C_50011_D_TimeSelected").text(); //收货时间类型
        var carriageCompanyId = EIMS_C_50011.Config.CarriageCompanyId; //物流公司id
        var payType = 1; //支付方式
        var invoiceId = 4; //发票id//个人发票
        var invoiceTitle = $("#EIMS_C_50011_InvoiceTitle").val(); //发票抬头
        var description = $("#EIMS_C_50011_OrderRemark").val();     //订单备注
        var cartDetailIds = EIMS_C_50011.Config.CartDetailIds; //购物车详情id集合

        if (deliveryId < 1) {   //收货地址
            alert("请设置收货地址");
            return false;
        }

        if (carriageCompanyId < 1) {    //物流公司
            alert("请选择物流公司");
            return false;
        }

        if (cartDetailIds.length < 1) {
            alert("购物车无商品");
            return false;
        }

        var keyValues = {
            ids: cartDetailIds,
            deliveryId: deliveryId,
            completeAddress: EIMS_C_50011.Config.SelecedDeliveryInfo.CompleteAddress,
            deliveryTime: deliveryTime,
            companyId: carriageCompanyId,
            payWay: payType,
            isUseBanlance: false,    //是否使用余额
            invoiceType: 4,    //个人普通发票（才有发票抬头）
            invoiceTitle: invoiceTitle,    //发票抬头
            taxInvoiceId: invoiceId,    //增值税发票id
            remark: description    //订单备注
        };

        AjaxMethod("ShoppingCart", "SubmitOrder", keyValues, function (data) {
            if (data.result == 0) {
                alert("提交失败, 原因：" + data.msg);
                $("#EIMS_C_50011_Submit").on("click", function () {
                    $(this).off("click");
                    EIMS_C_50011.SubmitOrder();
                });
                return;
            }
            alert("提交成功");
            document.location.href = MergeUrlParas(EIMS_C_50011.Config.CartStep3Page, true, ["orderId"], [data.msg.OrderId]);
        });
    }

};
/*  EIMS_C_50011 end  */
/*end_xn_mc_spcstep2_1_wrap*/

/*xn_mc_spcstep3_1_wrap*/
/* EIMS_C_50012 start */
$(function () {
    if ($("#EIMS_C_50012_Panel").length > 0) {
        EIMS_C_50012.Init();
    }
});

var EIMS_C_50012 = {
    Config: {
        PayedPage: "/m/spcstep4.aspx",    //支付宝支付成功自动跳转目标页面，可自定义
        SetPayPwdPage: "/m/setpay.aspx"
    },

    Init: function () {
        var orderId = QueryString("orderId");
        if (IsNullOrEmpty(orderId)) {
            return;
        }
        orderId = parseInt(orderId);
        if (isNaN(orderId) || orderId < 1) {
            return;
        }

        AjaxMethod("Order", "GetNoPayOrderInfo", { Id: orderId }, function (data) {
            EIMS_C_50012.GetOrderInfoCallBack(data);
        });

        $("#EIMS_C_50012_FogetPayPwd").attr("href", EIMS_C_50012.Config.SetPayPwdPage);
        if (EIMS_C_50012_OpenAutoCancelOrder == 1) {
            $(".EIMS_C_50012_PayHour").text(EIMS_C_50012_CancelNormallOrderTime);
        }

    }, //初始化

    GetOrderInfoCallBack: function (data) {
        if (data.result == 0) {
            alert(data.msg);
            return;
        }

        var orderData = data.msg;

        if (IsNullOrEmpty(orderData)) {
            return;
        }
        //订单编号
        $("#EIMS_C_50012_OrderNo").text(orderData.OrderInfo.OrderNo);

        var balance = parseFloat($(".EIMS_C_50012_AccountBalance").text());
        var orderCost = orderData.OrderInfo.ActualTotalMoney;
        $.extend(EIMS_C_50012.Config, { AccountBalance: balance, OrderCost: orderCost });

        EIMS_C_50012.InitPayWay(orderData);    //初始化支付方式
        EIMS_C_50012.BindEvents();    //绑定事件
    },

    InitPayWay: function (orderData) {
        //支付方式列表
        var html = "";
        var onlinePayWays = orderData.PayWay;
        for (var i = 0; i < onlinePayWays.length; i++) {
            html += "<li data_id='" + onlinePayWays[i].Id + "' data_name='" + onlinePayWays[i].Name +
                "'><img src=\"/" + onlinePayWays[i].LogoAddr + "\" title='" + onlinePayWays[i].Name + "'/></li>";
        }
        $(".EIMS_C_50012_OnlinePayWays").html(html);

        //初始化支付方式复选框、单选框
        var balance = EIMS_C_50012.Config.AccountBalance;
        var orderCost = EIMS_C_50012.Config.OrderCost;
        if (balance <= 0) {
            $("#EIMS_C_50012_AccountCkbDiv").css("display", "none");
            $("#EIMS_C_50012_OnlineCkbDiv").css("display", "none");
            $(".EIMS_C_50012_PayPwdDiv").css("display", "none");
            $(".EIMS_C_50012_AccountDiv").css("color", "gray")
            $("#EIMS_C_50012_AccountRadio").prop("disabled", true);
            $("#EIMS_C_50012_AccountRadio").prop("disabled", true);
            $("#EIMS_C_50012_OnlineRadio").prop("checked", true);
            $(".EIMS_C_50012_OnlinePayWays li:first").addClass("EIMS_C_50012_OnlinePaySelected").attr({ "data_check": "1" });
        }
        else if (balance < orderCost) {
            $("#EIMS_C_50012_AccountCkbDiv").css("display", "inline-block");
            $("#EIMS_C_50012_OnlineCkbDiv").css("display", "inline-block");
            $(".EIMS_C_50012_PayPwdDiv").css("display", "inline-block");
            $("#EIMS_C_50012_AccountRadioDiv").css("display", "none");
            $("#EIMS_C_50012_OnlineRadioDiv").css("display", "none");
            $("#EIMS_C_50012_AccountCkb").prop("checked", true);
            $("#EIMS_C_50012_OnlineCkb").prop("checked", true);
            $(".EIMS_C_50012_OnlinePayWays li:first").addClass("EIMS_C_50012_OnlinePaySelected").attr({ "data_check": "1" });
        }
        else {
            $(".EIMS_C_50012_PayPwdDiv").css("display", "inline-block");
            $("#EIMS_C_50012_AccountCkbDiv").css("display", "none");
            $("#EIMS_C_50012_OnlineCkbDiv").css("display", "none");
            $("#EIMS_C_50012_AccountRadio").prop("checked", true);
        }

        //判断是否支持货到付款
        var orderId = orderData.OrderInfo.Id;
        AjaxMethod("Order", "GetOrderFreight", { orderId: orderId }, function (data) {
            if (!data || (data.result == 1 && data.msg.IsCOD != 1)) {
                $("#EIMS_C_50012_CashOnDeliveryDiv").hide();    //不支持货到付款则隐藏
            }
        });

    },

    VerifyPayPassword: function () {
        var payPwd = $("#EIMS_C_50012_PayPwd").val().trim();
        if (payPwd.length == 0) {
            alert("请输入支付密码！");
            return false;
        }
        var flag = false;
        AjaxMethod("User", "VerifyPayPassword", { "payPwd": payPwd }, function (data) {
            if (data.result == 1) {
                flag = true;
            } else {
                alert(data.msg);
            }
        }, null, false);
        return flag;
    },

    BindEvents: function () {

        $("#EIMS_C_50012_AccountRadio").click(function () {
            $(".EIMS_C_50012_PayPwdDiv").slideDown();
            $("li.EIMS_C_50012_OnlinePaySelected").removeClass("EIMS_C_50012_OnlinePaySelected").removeAttr("data_check");
        });

        $("#EIMS_C_50012_OnlineRadio").click(function () {
            $(".EIMS_C_50012_PayPwdDiv").slideUp();
            if ($(".EIMS_C_50012_OnlinePaySelected").length == 0) {
                $(".EIMS_C_50012_OnlinePayWays li:first").addClass("EIMS_C_50012_OnlinePaySelected").attr({ "data_check": "1" });
            }
        });

        $("#EIMS_C_50012_CashOnDeliveryRadio").click(function () {
            $(".EIMS_C_50012_PayWay :checkbox:checked").prop("checked", false);
            $(".EIMS_C_50012_PayPwdDiv").slideUp();
            $("li.EIMS_C_50012_OnlinePaySelected").removeClass("EIMS_C_50012_OnlinePaySelected").removeAttr("data_check");
        });

        $("#EIMS_C_50012_AccountCkb").click(function () {
            if ($(this).prop("checked")) {
                $("#EIMS_C_50012_CashOnDeliveryRadio").prop("checked", false);
                $(".EIMS_C_50012_PayPwdDiv").slideDown();
                if (!$("#EIMS_C_50012_OnlineCkb").prop("checked") && EIMS_C_50012.Config.AccountBalance < EIMS_C_50012.Config.OrderCost) {
                    $("#EIMS_C_50012_OnlineCkb").prop("checked", true);
                    $(".EIMS_C_50012_OnlinePayWays li:first").addClass("EIMS_C_50012_OnlinePaySelected").attr({ "data_check": "1" });
                }
            } else {
                $(".EIMS_C_50012_PayPwdDiv").slideUp();
            }
        });

        $("#EIMS_C_50012_OnlineCkb").click(function () {
            if ($(this).prop("checked")) {
                $("#EIMS_C_50012_CashOnDeliveryRadio").prop("checked", false);
                $(".EIMS_C_50012_OnlinePayWays li:first").addClass("EIMS_C_50012_OnlinePaySelected").attr({ "data_check": "1" });
            } else {
                $(".EIMS_C_50012_OnlinePayWays li").removeClass("EIMS_C_50012_OnlinePaySelected").removeAttr("data_check");
            }
        });

        $(".EIMS_C_50012_OnlinePayWays li").click(function () { //在线支付切换事件
            $("li.EIMS_C_50012_OnlinePaySelected").removeClass("EIMS_C_50012_OnlinePaySelected").removeAttr("data_check");
            $(this).addClass("EIMS_C_50012_OnlinePaySelected").attr({ "data_check": "1" });
            $("#EIMS_C_50012_OnlineCkb:visible,#EIMS_C_50012_OnlineRadio:visible").prop("checked", true);
            $("#EIMS_C_50012_CashOnDeliveryRadio:checked").prop("checked", false);
        });

        //立刻去付款事件
        $("#EIMS_C_50012_GoPay").click(function () {

            var balance = EIMS_C_50012.Config.AccountBalance;
            var orderCost = EIMS_C_50012.Config.OrderCost;
            var orderId = parseInt(QueryString("orderId"));

            var payWay, onlineMoney;

            if ($("#EIMS_C_50012_AccountCkb").prop("checked") && !$("#EIMS_C_50012_OnlineCkb").prop("checked")) {
                alert("账户余额不足，请勾选在线支付！");
                return false;
            }

            if ($("#EIMS_C_50012_AccountRadio").prop("checked")) {
                payWay = 1;
                onlineMoney = 0;
            }   //余额付款
            else if ($("#EIMS_C_50012_OnlineRadio").prop("checked")) {
                payWay = 4;
                onlineMoney = orderCost;
            }   //在线支付
            else if ($("#EIMS_C_50012_CashOnDeliveryRadio").prop("checked")) {
                payWay = 3;
                onlineMoney = 0;
            }   //货到付款
            else if ($("#EIMS_C_50012_AccountCkb").prop("checked") && $("#EIMS_C_50012_OnlineCkb").prop("checked")) {
                payWay = 4;
                onlineMoney = orderCost - balance;
            }   //在线
            else if (!$("#EIMS_C_50012_AccountCkb").prop("checked") && $("#EIMS_C_50012_OnlineCkb").prop("checked")) {
                payWay = 4;
                onlineMoney = orderCost;
            }   //余额+在线

            //验证
            if ($("#EIMS_C_50012_AccountRadio").prop("checked") || $("#EIMS_C_50012_AccountCkb").prop("checked")) {
                if (!EIMS_C_50012.VerifyPayPassword()) {
                    return false;
                }
            }
            if (payWay == 4 && $(".EIMS_C_50012_OnlinePaySelected").length == 0) {
                alert("请选择在线支付方式");
                return false;
            }

            var payPwd = $("#EIMS_C_50012_PayPwd").val();
            var jsonParams = { id: orderId, payWay: payWay, onlineMoney: onlineMoney, payPwd: payPwd };

            AjaxMethod("Order", "UserGoPay", jsonParams, function (data) {
                if (data.result == 0) {
                    alert(data.msg);
                    return;
                }
                if (payWay == 1 || payWay == 3) {
                    window.location.href = MergeUrlParas(EIMS_C_50012.Config.PayedPage, true, ["orderId"], [orderId]);
                }
            }, null, false);

            if (payWay == 4) {

                var GotoPay = function () {
                    $("#EIMS_C_50012_TempForm").html("");
                    var onlinePayWayId = $(".EIMS_C_50012_OnlinePaySelected").attr("data_id");
                    var onlinePayWayName = $(".EIMS_C_50012_OnlinePaySelected").attr("data_name");
                    var returnUrl = MergeUrlParas(EIMS_C_50012.Config.PayedPage, true, [], []);    //orderId后台添加

                    var tempForm = $("<form id=\"tempForm\" action=\"../OnlinePay1/Default.aspx\" target=\"_self\" method=\"post\">\
                                <input type=\"hidden\" name=\"PayType\" value=\"" + onlinePayWayId + "\" />\
                                <input type=\"hidden\" name=\"BankName\" value=\"" + onlinePayWayName + "\" />\
                                <input type=\"hidden\" name=\"PayMoney\" value=\"" + onlineMoney + "\" />\
                                <input type=\"hidden\" name=\"OrderId\" value=\"" + orderId + "\" />\
                                <input type=\"hidden\" name=\"OrderType\" value=\"1\" />\
                                <input type=\"hidden\" name=\"ResultURL\" value=\"" + returnUrl + "\" /></form>")
                        .appendTo($("#EIMS_C_50012_TempForm"));

                    $(tempForm).submit();
                }
                GotoPay();
            }
        });

    }
}
/* EIMS_C_50012 end */
/*end_xn_mc_spcstep3_1_wrap*/

/*xn_mc_spcstep4_1_wrap*/
/* EIMS_C_50013 Start */
$(function () {
    try {
        if ($("#EIMS_C_50013_Panel").length > 0) {
            EIMS_C_50013.Init();
        }
    } catch (err) { }
});

var EIMS_C_50013 = {
    Config: {
        IndexPage: "/m/index.aspx",
        OrderDetailPage: "/m/orlist_view.aspx"
    },

    Init: function () {
        EIMS_C_50013.InitData();

        $("#EIMS_C_50013_IndexLink").click(function () {
            window.location.href = EIMS_C_50013.Config.IndexPage;
        });
        $("#EIMS_C_50013_OrderDetailLink").click(function () {
            window.location.href = EIMS_C_50013.Config.OrderDetailPage + "?Id=" + QueryString("orderId");
        });
    },

    InitData: function () {
        var orderId = QueryString("OrderId");

        if (IsNullOrEmpty(orderId) || isNaN(orderId) || orderId <= 0) {
            alert("无效的参数");
            return;
        }

        AjaxMethod("Order", "GetCarriageCompAndOrderInfo", { 'Id': orderId }, function (data) {
            if (IsNullOrEmpty(data)) {
                return;
            }
            if (data.result != 1) {
                alert(data.msg);
                return;
            }
            $(".EIMS_C_50013_OrderNo").html(data.msg.orderInfo.OrderNo);
            if (data.msg.orderInfo.PayType == "货到付款") {
                $(".EIMS_C_50013_CashOnDelivery").show();
                $(".EIMS_C_50013_Freight").text("￥" + data.msg.orderInfo.ActualTotalMoney.toFixed(2));
            }
        });
    }
}
/* EIMS_C_50013 End */
/*end_xn_mc_spcstep4_1_wrap*/

/*xn_mc_smsv_1_wrap*/
/*  EIMS_C_50025  2015/07/20 start  */
$(document).ready(function () {
    if($("#EIMS_C_50025_Panel").length > 0)
    {
        EIMS_C_50025.Init();
    };
});

var EIMS_C_50025 = {
    Config: {
        DisabledSeconds: 60,
        ActiveURL: "/m/pdata.aspx"

    }, //配置项

    Init: function () {
        var hideType = $('#EIMS_C_50025_HideType').val(); //是否已激活
        if (hideType==0) {
            $("#EIMS_C_50025_btnActiv").show();
            $("#EIMS_C_50025_btnChange").hide();
            $(".EIMS_C_50025_ChangeEmail").hide();
        } else {
            $("#EIMS_C_50025_btnChange").show();
            $("#EIMS_C_50025_btnActiv").hide();
        }
        $(".EIMS_C_50025_MailErrorTip").hide();
        $("#EIMS_C_50025_btnActiv,#EIMS_C_50025_GetCode").click(function () { //发送激活链接/获取邮箱验证码
            EIMS_C_50025.GetCheckEmailCode($(this));
        });

        $("#EIMS_C_50025_btnChange").click(function () {
            EIMS_C_50025.CheckValidCode();
        });

    },
    CheckValidCode: function() {
        // EIMS_C_50025_btnChange
        var code = $("#EIMS_C_50025_validCode").val();
        var val = $('#EIMS_C_50025_ActivUserMail').val();
        if (IsNullOrEmpty(code)) {
            $(".EIMS_C_50025_MailErrorTip").show();
            $(".EIMS_C_50025_MailErrorTip").text("请输入邮箱接收到的验证码！");
            return false;
        }
        var methodName = "CheckEmailCheckCode";
        var paramsData = { email: val, checkcode: code };


        AjaxMethod("User", methodName, paramsData, function (data) {
            if (data.result == 0) {
                $(".EIMS_C_50025_MailErrorTip").show();
                $('.EIMS_C_50025_MailErrorTip').text(data.msg);
            } else {
                $('#EIMS_C_50025_ActivUserMail').val("");
                $('#EIMS_C_50025_ActivUserMail').removeAttr("disabled");
                $("#EIMS_C_50025_btnActiv").show();
                $("#EIMS_C_50025_btnChange").hide();
                $(".EIMS_C_50025_ChangeEmail").hide();
                $("#EIMS_C_50025_HideType").val("3");

            }

        }, null, false);
    },
    GetCheckEmailCode: function (obj) {
        var hideType = $('#EIMS_C_50025_HideType').val(); //是否已激活
        var val = $('#EIMS_C_50025_ActivUserMail').val();
        if (!/^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/.test(val)) {
            $(".EIMS_C_50025_MailErrorTip").text("请输入有效的邮箱号");
            return false;
        }
        var linkurl = MergeUrlParas(EIMS_C_50025.Config.ActiveURL, true, [], []);
        var  methodName = "SendVerifyEmail";
        var keyValues = { email: val, url: linkurl, type: "1" };
        if (hideType==1) {
            methodName = "SendEmailCode";
            keyValues = { email: val, type: 2 };
        } else if (hideType == 3) {
            methodName = "SendVerifyEmail";
            keyValues = { email: val, url: linkurl, type: "1" };
        }
        //调用Ajax，发送验证码
        AjaxMethod("User", methodName, keyValues, function (data) {
            if (data.result != 1) {
                return false;
            }
            if (hideType==0||hideType==3) {
                $(".EIMS_C_50025_MailErrorTip").show().html("激活链接发送成功！");
            }

            //获取验证码成功，禁用按钮
            obj.attr({ "disabled": "disabled" });
            EIMS_C_50025.Config.DisabledSeconds = 60;
            EIMS_C_50025.ShowCountDownBtn(obj);

        });
    },
    //禁用按钮并倒计时
    ShowCountDownBtn: function () {
        var id = "";
        var hideType = $('#EIMS_C_50025_HideType').val();//是否已激活
        if (hideType==0) {
            id = "EIMS_C_50025_btnActiv";
        } else {
            id = "EIMS_C_50025_GetCode";
        }

        var obj = $('#' + id);

        if (EIMS_C_50025.Config.DisabledSeconds <= 0) {
            obj.removeAttr("disabled");
            $(".EIMS_C_50025_MailErrorTip").hide();
            if (hideType==0) {
                obj.val("发送激活链接");
            } else {
                obj.val("获取验证码");
            }
            return false;
        }
        obj.attr("disabled", "disabled");
        obj.val(" " + EIMS_C_50025.Config.DisabledSeconds + " 秒 ");

        EIMS_C_50025.Config.DisabledSeconds--;
        setTimeout(EIMS_C_50025.ShowCountDownBtn, 1000);
    }
};
/*  EIMS_C_50025 end  */
/*end_xn_mc_smsv_1_wrap*/

/*xn_mc_emlv_1_wrap*/
/*  EIMS_C_50024  2015/07/20 start  */
$(document).ready(function () {
    if($("#EIMS_C_50024_Panel").length > 0)
    {
        EIMS_C_50024.Init();
    };
});

var EIMS_C_50024 = {
    Config: {
        DisabledSeconds: 60,
        ActiveURL: "/m/pdata.aspx",
        MemberPage: "/m/member.aspx"

    }, //配置项

    Init: function () {
        var hideType = $('#EIMS_C_50024_HideType').val(); //是否已激活
        if (hideType == 0) {
            $("#EIMS_C_50024_btnActiv").show();
            $("#EIMS_C_50024_btnChange").hide();
        } else {
            $("#EIMS_C_50024_btnChange").show();
            $("#EIMS_C_50024_btnActiv").hide();
        }
        $(".EIMS_C_50024_MailErrorTip").hide();
        $("#EIMS_C_50024_GetCode,#EIMS_C_50024_btnActiv").click(function () { //发送激活码
            EIMS_C_50024.GetCheckEmailCode($(this));
        });

        $("#EIMS_C_50024_btnChange").click(function () {
            EIMS_C_50024.CheckValidCode();
        });

        //$("#EIMS_C_50024_btnActiv")

    },
    CheckValidCode: function () {
        var codeValue = $('#EIMS_C_50024_validCode').val();
        var code = $("#EIMS_C_50024_PhoneCode").val();
        var val = $('#EIMS_C_50024_ActivUserMobile').val();
        if (IsNullOrEmpty(codeValue)) {
            $(".EIMS_C_50024_MailErrorTip").text("请输入图片验证码").show();
            return false;
        }
        if (IsNullOrEmpty(code)) {
            $(".EIMS_C_50024_MailErrorTip").show();
            $(".EIMS_C_50024_MailErrorTip").text("请输入手机收到的验证码！");
            return false;
        }
        var methodName = "CheckMobileCheckCode"; //验证原手机号
        var paramsData = { mobile: val, checkcode: code };


        AjaxMethod("User", methodName, paramsData, function (data) {
            if (data.result == 0) {
                $(".EIMS_C_50024_MailErrorTip").show();
                $('.EIMS_C_50024_MailErrorTip').text(data.msg);
            } else {
                $('#EIMS_C_50024_ActivUserMobile,#EIMS_C_50024_validCode,#EIMS_C_50024_PhoneCode').val(""); //设置为空
                $('#EIMS_C_50024_ActivUserMobile').removeAttr("disabled"); //去除禁用
                $("#EIMS_C_50024_btnActiv").show(); //显示激活
                $("#EIMS_C_50024_btnChange").hide(); //隐藏修改
                $("#EIMS_C_50024_HideType").val("3"); //修改手机
                $("#EIMS_C_50024_GetCode").removeAttr("disabled").val("获取激活码");
                EIMS_C_50024.Config.DisabledSeconds = -1;
                $('#EIMS_C_50024_CheckCode').click(); //刷新验证码

            }

        }, null, false);
    },
    GetCheckEmailCode: function (obj) {
        var hideType = $('#EIMS_C_50024_HideType').val(); //是否已激活
        var val = $('#EIMS_C_50024_ActivUserMobile').val();
        var codeValue = $('#EIMS_C_50024_validCode').val();
        var imgCodeKey = $("#EIMS_C_50024_CheckCode").attr("data-key");
        var clickType = obj.attr("clickType"); //哪个按钮点击   立即激活/更换手机
        var validCode = $("#EIMS_C_50024_PhoneCode").val();


        if (!/^1[3-8]\d{9}$/.test(val)) {
            $(".EIMS_C_50024_MailErrorTip").text("请输入有效的手机号码").show();
            return false;
        }
        if (IsNullOrEmpty(codeValue)) {
            $(".EIMS_C_50024_MailErrorTip").text("请输入图片验证码").show();
            return false;
        }
        var methodName = "CheckCode";
        var keyValues = { "inputCode": codeValue, "code": imgCodeKey, "mobile": val, type: 2 }; //发送激活手机码

        if (hideType == 0 && clickType == 0) {
            methodName = "ValidMobile";
            keyValues = { mobile: val, checkcode: validCode, type: 1 };
        }
        if (hideType == 3) {
            methodName = "SendNewMobileCode";
            keyValues = { mobile: val, type: 0 };
        }
        //调用Ajax，发送验证码
        AjaxMethod("User", methodName, keyValues, function (data) {
            if (data.result != 1) {
                $(".EIMS_C_50024_MailErrorTip").text(data.msg).show();
                $("#EIMS_C_50024_CheckCode").click();
                $('#EIMS_C_50024_validCode').val("");
                return false;
            }

            //获取验证码成功，禁用按钮

            if (hideType == 0 && clickType == 0) {

                $('#EIMS_C_50024_validCode,#EIMS_C_50024_PhoneCode').val(""); //设置为空
                $(".EIMS_C_50024_MailErrorTip").show().html("手机激活成功！");
                window.location.href = EIMS_C_50024.Config.MemberPage;
            } else if (hideType == 0 || hideType == 1 || hideType == 3) {
                obj.attr({ "disabled": "disabled" });
                $(".EIMS_C_50024_MailErrorTip").show().html("激活验证码发送成功！");
                EIMS_C_50024.Config.DisabledSeconds = 60;
                EIMS_C_50024.ShowCountDownBtn(obj);
            }
            if (hideType == 3) {
                $("#EIMS_C_50024_HideType").val("0"); //激活新手机
            }


        });
    },
    //禁用按钮并倒计时
    ShowCountDownBtn: function () {
        var id = "";
        var hideType = $('#EIMS_C_50024_HideType').val(); //是否已激活
        if (hideType == 0 || hideType == 1 || hideType == 3) {
            id = "EIMS_C_50024_GetCode";
        } else if (hideType == 0) {
            id = "EIMS_C_50024_btnActiv";
        }

        var obj = $('#' + id);

        if (EIMS_C_50024.Config.DisabledSeconds <= 0) {
            obj.removeAttr("disabled");
            $(".EIMS_C_50024_MailErrorTip").hide();
            if (hideType == 0 || hideType == 3) {
                obj.val("获取验证码");
            } else {
                obj.val("立刻激活");
            }
            return false;
        }
        obj.attr("disabled", "disabled");
        obj.val(" " + EIMS_C_50024.Config.DisabledSeconds + " 秒 ");

        EIMS_C_50024.Config.DisabledSeconds--;
        setTimeout(EIMS_C_50024.ShowCountDownBtn, 1000);
    }


};
/*  EIMS_C_50024 end  */
/*end_xn_mc_emlv_1_wrap*/

/*xn_mc_balance_1_wrap*/
/*  EIMS_C_50021  2015/07/15 start  */
$(document).ready(function () {
    if($("#EIMS_C_50021_Panel").length > 0)
    {
        EIMS_C_50021.Init();
    };
});

var EIMS_C_50021 = {
    Config: {
        operTypeValue: null,
        moneyTypeValue: null,
        ToOnlinePayUrl: "/m/balance_view.aspx",   //在线充值控件

    }, //配置项

    Init: function () {
        /*在线充值*/
        $(document).on("click", "#EIMS_C_50021_btnOnlinePay", function () {
            window.location.href = EIMS_C_50021.Config.ToOnlinePayUrl;
        });

        $("#EIMS_C_50021_ClearSearch").click(function() {
            $(".EIMS_C_50021_RFilter ul li").children("img").hide();
            EIMS_C_50021.Config.operTypeValue = null;
            EIMS_C_50021.Config.moneyTypeValue = null;
            $("#EIMS_C_50021_BeginTime,#EIMS_C_50021_EndTime").val('');
            document.location.href = MergeUrlParas(null, true, [],[]);
        });

        /*点击搜索列表*/
        $(document).on("click", ".EIMS_C_50021_RFilter ul li", function () {
            $(this).siblings("li[date-type='"+$(this).attr("date-type")+"']").children("img").hide();

            if ($(this).attr("date-type") == "1") {//消费明细类型
                if ($(this).children("img").css('display') == 'none') {
                    $(this).children("img").css('display','inline-block');
                    EIMS_C_50021.Config.operTypeValue = $(this).attr("data_opertypeid");
                } else {
                    $(this).children("img").hide();
                    EIMS_C_50021.Config.operTypeValue = null;
                }

            } else {//收入/支出明细类型
                if ($(this).children("img").css('display') == 'none') {
                    $(this).children("img").css('display','inline-block');
                    EIMS_C_50021.Config.moneyTypeValue = $(this).attr("data_moneytype");
                } else {
                    $(this).children("img").hide();
                    EIMS_C_50021.Config.moneyTypeValue = null;
                }
            }

        });


        if (QueryString("moneyType")!="") {
            $(".EIMS_C_50021_RFilter li[data_moneytype='" + QueryString("moneyType") + "']").click();
        }
        if (QueryString("operType")!="") {
            $(".EIMS_C_50021_RFilter li[data_opertypeid='" + QueryString("operType") + "']").click();
        }
        if (QueryString("beginTime")!="") {
            $("#EIMS_C_50021_BeginTime").val(QueryString("beginTime"));
        }
        if (QueryString("endTime")!="") {
            $("#EIMS_C_50021_EndTime").val(QueryString("endTime"));
        }


        $("#EIMS_C_50021_btnSure").click(function () {
            EIMS_C_50021.SearchList();
        });

    },

    //验证搜索
    SearchList: function () {
        var operType = EIMS_C_50021.Config.operTypeValue;
        var beginDate = $("#EIMS_C_50021_BeginTime").val();
        var endDate = $("#EIMS_C_50021_EndTime").val();
        var moneyType = EIMS_C_50021.Config.moneyTypeValue;

        if (beginDate > endDate) {
            alert("开始时间应小于结束时间！");
            endDate = $(".EIMS_C_50021_EndTime").val("");
            return false;
        }
        document.location.href = MergeUrlParas(null, false, ["operType", "beginTime", "endTime", "moneyType"], [operType, beginDate, endDate, moneyType]);
        return true;
    }
};
/*  EIMS_C_50021 end  */
/*end_xn_mc_balance_1_wrap*/

/*xn_mc_balancev_1_wrap*/
/*  EIMS_C_50022  2015/07/15 start  */
$(document).ready(function () {
    if($("#EIMS_C_50022_Panel").length > 0)
    {
        EIMS_C_50022.Init();
    };
});

var EIMS_C_50022 = {
    Config: {
        RechargeSuccessPage: "/m/balance.aspx"
    }, //配置项

    Init: function () {

        if($("#xn_mc_balancev_1_wrap").length > 0){
            if (payWays.length == 0) {
                return;
            }

            var html = "";
            for (var i = 0; i < payWays.length; i++) {
                html += "<li data_id='" + payWays[i].Id + "' class=\"EIMS_C_50022_PayOnline\" data_name='" + payWays[i].Name +
                    "'><img width='80' height='25' src=\"/" + payWays[i].LogoAddr + "\" title='" + payWays[i].Name + "'/></li>";
            }

            $("#EIMS_C_50022_PayTypeList").html(html);

            //在线支付切换事件
            $("#EIMS_C_50022_PayTypeList li").click(function () {
                $(".EIMS_C_50022_PayOnlineSelected").addClass("EIMS_C_50022_PayOnline").removeClass("EIMS_C_50022_PayOnlineSelected");
                $(this).removeClass("EIMS_C_50022_PayOnline").addClass("EIMS_C_50022_PayOnlineSelected");

            });

            $("#EIMS_C_50022_Money").bind("blur", function () {
                var v = $(this).val();

                if (!/^\d+\.?\d{0,}$/.test(v)) {
                    $(this).val("0");
                    return;
                }

            });

            $("#EIMS_C_50022_btnPay").click(function () {
                EIMS_C_50022.GoRecharge();
            });
        }
    },

    GoRecharge: function () {
        $(".EIMS_C_50022_ErrorTip").text("");

        var v = parseFloat($("#EIMS_C_50022_Money").val());

        if (isNaN(v) || v <= 0) {
            $(".EIMS_C_50022_ErrorTip").text("请输入充值金额");
            return false;
        }

        if ($(".EIMS_C_50022_PayOnlineSelected").length == 0) {
            $(".EIMS_C_50022_ErrorTip").text("请选择充值平台");
            return false;
        }

        var GotoPay = function () {
            $("#EIMS_C_50022_DivTempForm").html("");
            var onlinePayWayId = $(".EIMS_C_50022_PayOnlineSelected").attr("data_id");
            var onlinePayWayName = $(".EIMS_C_50022_PayOnlineSelected").attr("data_name");
            var returnUrl = MergeUrlParas(EIMS_C_50022.Config.RechargeSuccessPage, true, [], []);  //支付成功后回调页面

            //OrderType == 3 表示会员在线充值
            var tempForm = $("<form id=\"tempForm\" action=\"../OnlinePay1/Default.aspx\" method=\"post\">\
                            <input type=\"hidden\" name=\"PayMoney\" value=\"" + v + "\" />\
                            <input type=\"hidden\" name=\"OrderId\" value=\"-1\" /><input type=\"hidden\" name=\"OrderType\" value=\"3\" />\
                            <input type=\"hidden\" name=\"PayType\" value=\"" + onlinePayWayId + "\" />\
                            <input type=\"hidden\" name=\"BankName\" value=\"" + onlinePayWayName + "\" />\
                            <input type=\"hidden\" name=\"ResultURL\" value=\"" + returnUrl + "\" /></form>")
                .appendTo($("#EIMS_C_50022_DivTempForm"));

            $(tempForm).submit();
        }

        GotoPay();
    } //去充值

};
/*  EIMS_C_50022 end  */
/*end_xn_mc_balancev_1_wrap*/

/*xn_mc_setpay_1_wrap*/
$(function () {
    try {
        if ($("#EIMS_C_50023_Panel").length > 0) {
            EIMS_C_50023.Init();
        }
    } catch (err) { }
});

var EIMS_C_50023 = {
    Config: {
        DisabledSeconds: 60, //点击验证码后按钮禁用倒计时秒数
        LoginUrl: "/m/login.aspx",
        MemberPage: "/m/member.aspx"
    },

    Init: function () {

        var mobile = $("#EIMS_C_50023_Mobile").val();
        if (!IsNullOrEmpty(mobile)) {
            $("#EIMS_C_50023_Mobile").prop("disabled", true);
        }
        var mail = $("#EIMS_C_50023_Mail").val();
        if (!IsNullOrEmpty(mail)) {
            $("#EIMS_C_50023_Mail").prop("disabled", true);
        }

        $("#EIMS_C_50023_MemberLink").on("click", function () {
            window.location.href = MergeUrlParas(EIMS_C_50023.Config.MemberPage, true, [], []);
        });

        $("#EIMS_C_50023_MobileLink").on("click", function () {
            if ($(this).hasClass("EIMS_C_50023_ActiveTab")) { return; }
            $("#EIMS_C_50023_MailLink").removeClass("EIMS_C_50023_ActiveTab");
            $(this).addClass("EIMS_C_50023_ActiveTab");
            $("#EIMS_C_50023_TabMail").slideUp();
            $("#EIMS_C_50023_TabMobile").slideDown();
        });

        $("#EIMS_C_50023_MailLink").on("click", function () {
            if ($(this).hasClass("EIMS_C_50023_ActiveTab")) { return; }
            $("#EIMS_C_50023_MobileLink").removeClass("EIMS_C_50023_ActiveTab");
            $(this).addClass("EIMS_C_50023_ActiveTab");
            $("#EIMS_C_50023_TabMobile").slideUp();
            $("#EIMS_C_50023_TabMail").slideDown();
        });

        $("#EIMS_C_50023_BtnMobileCheckCode").on("click", function () {
            EIMS_C_50023.GetMobileCheckCode();
        });
        $("#EIMS_C_50023_BtnMailCheckCode").on("click", function () {
            EIMS_C_50023.GetMailCheckCode();
        });

        $("#EIMS_C_50023_NestStep").on("click", function () {
            if ($("#EIMS_C_50023_MobileLink").hasClass("EIMS_C_50023_ActiveTab")) {
                EIMS_C_50023.VerifyMobileCode();
            } else if ($("#EIMS_C_50023_MailLink").hasClass("EIMS_C_50023_ActiveTab")) {
                EIMS_C_50023.VerifyMailCode();
            }
        });
    },

    GetMobileCheckCode: function () {
        if (!EIMS_C_50023.CheckMobile()) {
            return false;
        }

        var mobile = $("#EIMS_C_50023_Mobile").val();
        var inCode = $('#EIMS_C_50023_InCode').val();
        var checkCode = $("#EIMS_C_50023_CheckCode").attr("data-key");
        var params = { "inputCode": inCode, "code": checkCode, "mobile": mobile, type: 2 }

        //调用Ajax，发送验证码
        AjaxMethod("User", "CheckCode", params, function (data) {
            if (data.result != 1) {
                $("#EIMS_C_50023_CheckCodeTip").text(data.msg);
                $("#EIMS_C_50023_CheckCode").click();
                return false;
            }

            $("#EIMS_C_50023_CheckCodeTip").text("");
            $("#EIMS_C_50023_BtnMobileCheckCode").prop("disabled", true);
            EIMS_C_50023.Config.DisabledSeconds = 60;
            EIMS_C_50023.CountDown();
        });
    },

    GetMailCheckCode: function () {
        if (!EIMS_C_50023.CheckMail()) {
            return false;
        }

        var mail = $("#EIMS_C_50023_Mail").val();

        //调用Ajax，发送验证码
        AjaxMethod("User", "SendEmailCode", { "email": mail, type: 3 }, function (data) {
            if (data.result != 1) {
                $("#EIMS_C_50023_MailTip").text(data.msg);
                return false;
            }

            $("#EIMS_C_50023_MailTip").text("");
            $("#EIMS_C_50023_BtnMailCheckCode").prop("disabled", true);
            EIMS_C_50023.Config.DisabledSeconds = 60;
            EIMS_C_50023.CountDown();
        });
    },

    CountDown: function () {
        var btnGetCode;
        if ($("#EIMS_C_50023_MobileLink").hasClass("EIMS_C_50023_ActiveTab")) {
            btnGetCode = $("#EIMS_C_50023_BtnMobileCheckCode");
        } else {
            btnGetCode = $("#EIMS_C_50023_BtnMailCheckCode");
        }

        if (EIMS_C_50023.Config.DisabledSeconds <= 0) {
            btnGetCode.val("获取验证码");
            btnGetCode.prop("disabled", false);
            return false;
        }
        btnGetCode.prop("disabled", true);
        btnGetCode.val(" " + EIMS_C_50023.Config.DisabledSeconds + " 秒 ");

        EIMS_C_50023.Config.DisabledSeconds--;
        setTimeout(EIMS_C_50023.CountDown, 1000);
    },

    CheckMobile: function () {
        var tip = $("#EIMS_C_50023_MobileTip");
        var input = $("#EIMS_C_50023_Mobile");
        var mobile = input.val();

        var Mobile = /^[1][358]\d{9}$/;

        if (mobile.length == 0) {
            tip.text("请输入您的手机号码！");
            input.focus();
            return false;
        }
        if (!Mobile.test(mobile)) {
            tip.text("手机号码格式不正确，请重新输入！");
            input.focus();
            return false;
        }
        tip.text("");
        return true;
    },

    CheckMail: function () {
        var tip = $("#EIMS_C_50023_MailTip");
        var input = $("#EIMS_C_50023_Mail");
        var value = input.val();

        var reg = /^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/;

        if (value.length == 0) {
            tip.text("请输入您的邮箱！");
            input.focus();
            return false;
        }
        if (!reg.test(value)) {
            tip.text("手机号码格式不正确，请重新输入！");
            input.focus();
            return false;
        }
        tip.text("");
        return true;
    },

    VerifyMobileCode: function () {
        if (!EIMS_C_50023.CheckMobile()) {
            return false;
        }

        var mobile = $("#EIMS_C_50023_Mobile").val();
        var mobilecode = $("#EIMS_C_50023_MobileCheckCode").val();
        var tip = $("#EIMS_C_50023_MobileCheckCodeTip");

        if (mobilecode.length == 0) {
            tip.text("请输入您接收到的验证码！");
            $("#EIMS_C_50023_MobileCheckCode").focus();
            return false;
        }

        if (mobilecode.length < 4) {
            tip.text("验证码不匹配！");
            $("#EIMS_C_50023_MobileCheckCode").focus();
            return false;
        }

        var params = { "mobile": mobile, "checkcode": mobilecode, "seekPwdWay": "mobile" };

        AjaxMethod("User", "CheckMobileCheckCode", params, function (data) {
            if (data.result != 1) {
                tip.text(data.msg);
                return false;
            }
            Mobilebone.transition($("#EIMS_C_50023_Step2")[0], $("#EIMS_C_50023_Step1")[0]);
            EIMS_C_50023.BindEvents_Step2();
        });

    },

    VerifyMailCode: function () {
        if (!EIMS_C_50023.CheckMail()) {
            return false;
        }

        var mail = $("#EIMS_C_50023_Mail").val();
        var mailcode = $("#EIMS_C_50023_MailCheckCode").val();
        var tip = $("#EIMS_C_50023_MailCheckCodeTip");

        if (mailcode.length == 0) {
            tip.text("请输入您接收到的验证码！");
            $("#EIMS_C_50023_MailCheckCode").focus();
            return false;
        }

        if (mailcode.length < 4) {
            tip.text("验证码不匹配！");
            $("#EIMS_C_50023_MailCheckCode").focus();
            return false;
        }

        var params = { "email": mail, "checkcode": mailcode, "seekPwdWay": "email" };

        AjaxMethod("User", "CheckEmailCheckCode", params, function (data) {
            if (data.result != 1) {
                tip.text(data.msg);
                return false;
            }
            Mobilebone.transition($("#EIMS_C_50023_Step2")[0], $("#EIMS_C_50023_Step1")[0]);
            EIMS_C_50023.BindEvents_Step2();
        });

    },

    BindEvents_Step2: function () {
        $("#EIMS_C_50023_Ckb").on("click", function () {
            var htmlTemp;
            var pwd = $("#EIMS_C_50023_PayPwd").val();
            if ($(this).prop("checked")) {
                htmlTemp = "<input type=text id=EIMS_C_50023_PayPwd maxlength=20 placeholder=请输入新支付密码 />";
            } else {
                htmlTemp = "<input type=password id=EIMS_C_50023_PayPwd maxlength=20 placeholder=请输入新支付密码 />";
            }
            $("#EIMS_C_50023_PayPwd").replaceWith(htmlTemp);
            $("#EIMS_C_50023_PayPwd").val(pwd);
        });

        $("#EIMS_C_50023_SetPayPwd").on("click", function () {
            return EIMS_C_50023.SetPayPwd();
        });
    },

    SetPayPwd: function () {
        var payPwd = $("#EIMS_C_50023_PayPwd").val().trim();
        var tip = $("#EIMS_C_50023_PayPwdTip");
        if (IsNullOrEmpty(payPwd)) {
            tip.text("请输入新的支付密码！");
            return false;
        }
        if (payPwd.length < 6) {
            tip.text("支付密码不能小于6位！");
            return false;
        }
        if (payPwd.indexOf(" ") > -1) {
            tip.text("支付密码不能包含空格！");
            return false;
        }
        if (/[\u4E00-\u9FA5]/i.test(payPwd)) {
            tip.text("密码中不允许输入中文,请重新输入");
            return false;
        }

        AjaxMethod("User", "UpdatePayPwd", { "type": 0, "newPayPwd": payPwd }, function (data) {
            if (data.result != 1) {
                tip.text(data.msg);
                return false;
            }
            alert("修改成功！");
            window.location.href = MergeUrlParas(EIMS_C_50023.Config.MemberPage, true, [], []);
        });
    }
}
/*end_xn_mc_setpay_1_wrap*/








